mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add ZVAL_OBJ_COPY macro
For the common ZVAL_OBJ + GC_ADDREF pattern. This mirrors the existing ZVAL_STR_COPY API.
This commit is contained in:
parent
b516566b84
commit
15846ff115
27 changed files with 89 additions and 140 deletions
|
@ -110,8 +110,7 @@ U_CFUNC zend_object_iterator *_breakiterator_get_iterator(
|
|||
|
||||
zoi_with_current *zoi_iter = static_cast<zoi_with_current*>(emalloc(sizeof *zoi_iter));
|
||||
zend_iterator_init(&zoi_iter->zoi);
|
||||
Z_ADDREF_P(object);
|
||||
ZVAL_OBJ(&zoi_iter->zoi.data, Z_OBJ_P(object));
|
||||
ZVAL_OBJ_COPY(&zoi_iter->zoi.data, Z_OBJ_P(object));
|
||||
zoi_iter->zoi.funcs = &breakiterator_iterator_funcs;
|
||||
zoi_iter->zoi.index = 0;
|
||||
zoi_iter->destroy_it = _breakiterator_destroy_it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue