summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-02-13 22:20:39 +0300
committerDmitry Stogov <dmitry@zend.com>2015-02-13 22:20:39 +0300
commite10e151e9b92313a7085272c85bebf6c82017fce (patch)
tree6cac4100536c5e25143c55d1ab6b2f3b3dc81cf9 /Zend/zend_compile.c
parentbc630ad6da0c6d7cf2d224dba8972499d5691c6b (diff)
downloadphp-git-e10e151e9b92313a7085272c85bebf6c82017fce.tar.gz
Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index ba5046f343..36055258f6 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -865,10 +865,7 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */
(*op_array->refcount)++;
if (op_array->static_variables) {
- HashTable *static_variables = op_array->static_variables;
-
- ALLOC_HASHTABLE(op_array->static_variables);
- zend_array_dup(op_array->static_variables, static_variables);
+ op_array->static_variables = zend_array_dup(op_array->static_variables);
}
op_array->run_time_cache = NULL;
} else if (function->type == ZEND_INTERNAL_FUNCTION) {