mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Nuke persist_alloc().
This commit is contained in:
parent
c83f5a530d
commit
b53569c9e8
7 changed files with 3 additions and 71 deletions
|
@ -138,37 +138,6 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
|||
}
|
||||
|
||||
|
||||
ZEND_API int zval_persist(zval *zvalue TSRMLS_DC)
|
||||
{
|
||||
switch (zvalue->type) {
|
||||
case IS_OBJECT:
|
||||
case IS_RESOURCE:
|
||||
return FAILURE; /* resources and objects cannot be persisted */
|
||||
break;
|
||||
case IS_BOOL:
|
||||
case IS_LONG:
|
||||
case IS_NULL:
|
||||
break;
|
||||
case IS_CONSTANT:
|
||||
case IS_STRING:
|
||||
if (zvalue->value.str.val) {
|
||||
if (zvalue->value.str.len==0) {
|
||||
zvalue->value.str.val = empty_string;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
persist_alloc(zvalue->value.str.val);
|
||||
break;
|
||||
case IS_ARRAY:
|
||||
case IS_CONSTANT_ARRAY:
|
||||
persist_alloc(zvalue->value.ht);
|
||||
zend_hash_apply(zvalue->value.ht, (apply_func_t) zval_persist TSRMLS_CC);
|
||||
break;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int zend_print_variable(zval *var)
|
||||
{
|
||||
return zend_print_zval(var, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue