diff options
| author | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:22:07 +0000 |
|---|---|---|
| committer | Yiduo (David) Wang <davidw@php.net> | 2007-10-07 05:22:07 +0000 |
| commit | 4b4d634cb956de1efc13c8ed9b243fe1a85f783b (patch) | |
| tree | eaa8d691de244aff3ee68fd3c23f769f02fa4446 /ext/standard/basic_functions.c | |
| parent | ca4c55ad3a673257925bd9b458683c4f0e60e755 (diff) | |
| download | php-git-4b4d634cb956de1efc13c8ed9b243fe1a85f783b.tar.gz | |
MFH: Added macros for managing zval refcounts and is_ref statuses
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 6119e74fb8..cf10e21cea 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5418,7 +5418,7 @@ PHP_FUNCTION(register_shutdown_function) } for (i = 0; i < shutdown_function_entry.arg_count; i++) { - shutdown_function_entry.arguments[i]->refcount++; + Z_ADDREF_P(shutdown_function_entry.arguments[i]); } zend_hash_next_index_insert(BG(user_shutdown_function_names), &shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); } @@ -5994,7 +5994,7 @@ PHP_FUNCTION(register_tick_function) } for (i = 0; i < tick_fe.arg_count; i++) { - tick_fe.arguments[i]->refcount++; + Z_ADDREF_P(tick_fe.arguments[i]); } zend_llist_add_element(BG(user_tick_functions), &tick_fe); @@ -6285,7 +6285,7 @@ static int copy_request_variable(void *pDest, int num_args, va_list args, zend_h } zend_delete_global_variable(Z_STRVAL(new_key), Z_STRLEN(new_key) TSRMLS_CC); - ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), Z_STRVAL(new_key), Z_STRLEN(new_key) + 1, *var, (*var)->refcount + 1, 0); + ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), Z_STRVAL(new_key), Z_STRLEN(new_key) + 1, *var, Z_REFCOUNT_PP(var) + 1, 0); zval_dtor(&new_key); return 0; |
