diff options
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r-- | Zend/zend_variables.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 70f816166b..7fef64f8b2 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -5,7 +5,7 @@ | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is | + | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | @@ -39,7 +39,7 @@ ZEND_API void _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC) } case IS_ARRAY: { zend_array *arr = (zend_array*)p; - + if (arr != &EG(symbol_table)) { /* break possible cycles */ GC_TYPE(arr) = IS_NULL; @@ -51,20 +51,20 @@ ZEND_API void _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC) } case IS_CONSTANT_AST: { zend_ast_ref *ast = (zend_ast_ref*)p; - + zend_ast_destroy_and_free(ast->ast); efree_size(ast, sizeof(zend_ast_ref)); break; } case IS_OBJECT: { zend_object *obj = (zend_object*)p; - + OBJ_RELEASE(obj); break; } case IS_RESOURCE: { zend_resource *res = (zend_resource*)p; - + if (--GC_REFCOUNT(res) == 0) { /* destroy resource */ zend_list_free(res); @@ -74,7 +74,7 @@ ZEND_API void _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC) case IS_REFERENCE: { zend_reference *ref = (zend_reference*)p; if (--GC_REFCOUNT(ref) == 0) { - + i_zval_ptr_dtor(&ref->val ZEND_FILE_LINE_RELAY_CC); efree_size(ref, sizeof(zend_reference)); } @@ -97,7 +97,7 @@ ZEND_API void _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC) } case IS_ARRAY: { zend_array *arr = (zend_array*)p; - + if (arr != &EG(symbol_table)) { /* break possible cycles */ GC_TYPE(arr) = IS_NULL; @@ -116,20 +116,20 @@ ZEND_API void _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC) } case IS_OBJECT: { zend_object *obj = (zend_object*)p; - + zend_objects_store_del(obj); break; } case IS_RESOURCE: { zend_resource *res = (zend_resource*)p; - + /* destroy resource */ zend_list_free(res); break; } case IS_REFERENCE: { zend_reference *ref = (zend_reference*)p; - + i_zval_ptr_dtor(&ref->val ZEND_FILE_LINE_RELAY_CC); efree_size(ref, sizeof(zend_reference)); break; @@ -237,7 +237,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) break; case IS_ARRAY: { HashTable *ht; - + if (Z_ARR_P(zvalue) == &EG(symbol_table)) { return; /* do nothing */ } @@ -264,7 +264,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) } -ZEND_API size_t zend_print_variable(zval *var) +ZEND_API size_t zend_print_variable(zval *var) { return zend_print_zval(var, 0); } @@ -308,10 +308,10 @@ ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash HashTable *target = va_arg(args, HashTable*); zend_bool is_ref; zval tmp; - + if (Z_CONST_FLAGS_P(p) & (IS_LEXICAL_VAR|IS_LEXICAL_REF)) { is_ref = Z_CONST_FLAGS_P(p) & IS_LEXICAL_REF; - + symbol_table = zend_rebuild_symbol_table(); p = zend_hash_find(&symbol_table->ht, key->key); if (!p) { @@ -349,7 +349,7 @@ ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash } } else if (Z_REFCOUNTED_P(p)) { Z_ADDREF_P(p); - } + } zend_hash_add(target, key->key, p); return ZEND_HASH_APPLY_KEEP; } |