mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use reference-counting
This commit is contained in:
parent
90f822d68e
commit
c57dd7c6ef
1 changed files with 2 additions and 3 deletions
|
@ -355,11 +355,10 @@ static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval
|
|||
}
|
||||
}
|
||||
|
||||
// TODO Avoid the copy_ctor
|
||||
static inline int ct_eval_add_array_elem(zval *result, zval *value, zval *key) {
|
||||
if (!key) {
|
||||
if ((value = zend_hash_next_index_insert(Z_ARR_P(result), value))) {
|
||||
zval_copy_ctor(value);
|
||||
Z_TRY_ADDREF_P(value);
|
||||
return SUCCESS;
|
||||
}
|
||||
return FAILURE;
|
||||
|
@ -389,7 +388,7 @@ static inline int ct_eval_add_array_elem(zval *result, zval *value, zval *key) {
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
zval_copy_ctor(value);
|
||||
Z_TRY_ADDREF_P(value);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue