diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-02-13 22:20:39 +0300 |
commit | e10e151e9b92313a7085272c85bebf6c82017fce (patch) | |
tree | 6cac4100536c5e25143c55d1ab6b2f3b3dc81cf9 /Zend/zend.c | |
parent | bc630ad6da0c6d7cf2d224dba8972499d5691c6b (diff) | |
download | php-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.c')
-rw-r--r-- | Zend/zend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 1bd70ab292..d5618b490d 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -550,8 +550,9 @@ static zend_bool php_auto_globals_create_globals(zend_string *name) /* {{{ */ zval globals; ZVAL_ARR(&globals, &EG(symbol_table)); + Z_TYPE_INFO_P(&globals) = IS_ARRAY | (IS_TYPE_SYMBOLTABLE << Z_TYPE_FLAGS_SHIFT); ZVAL_NEW_REF(&globals, &globals); - zend_hash_update(&EG(symbol_table).ht, name, &globals); + zend_hash_update(&EG(symbol_table), name, &globals); return 0; } /* }}} */ @@ -1129,8 +1130,7 @@ static void zend_error_va_list(int type, const char *format, va_list args) if (!symbol_table) { ZVAL_NULL(¶ms[4]); } else { - ZVAL_NEW_ARR(¶ms[4]); - zend_array_dup(Z_ARRVAL(params[4]), &symbol_table->ht); + ZVAL_ARR(¶ms[4], zend_array_dup(symbol_table)); } ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler)); |