diff options
| author | Zeev Suraski <zeev@php.net> | 1999-12-24 14:49:57 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 1999-12-24 14:49:57 +0000 |
| commit | 946df29029be9eb9c4d09696e706dab99e7d8e50 (patch) | |
| tree | eaf127fdba4f2f2e180f5666cfcf0da08ee55eb2 /Zend | |
| parent | af925f0a14c661aefbc1abbdc464cd775bf2bc9b (diff) | |
| download | php-git-946df29029be9eb9c4d09696e706dab99e7d8e50.tar.gz | |
- Use function_add_ref() here too
Diffstat (limited to 'Zend')
| -rw-r--r-- | Zend/zend_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index b2a4cc32c9..19c3039411 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1035,13 +1035,13 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl zend_function *function; zend_hash_find(function_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &function); - (*function->op_array.refcount)++; - if (zend_hash_add(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, function, sizeof(zend_function), NULL)==FAILURE) { + if (zend_hash_add(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, function, sizeof(zend_function), (void **) &function)==FAILURE) { if (!compile_time) { zend_error(E_ERROR, "Cannot redeclare %s()", opline->op2.u.constant.value.str.val); } return FAILURE; } else { + function_add_ref(function); return SUCCESS; } } |
