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
|
@ -1085,8 +1085,7 @@ PHP_FUNCTION(xml_set_object)
|
|||
parser = Z_XMLPARSER_P(pind);
|
||||
|
||||
zval_ptr_dtor(&parser->object);
|
||||
Z_ADDREF_P(mythis);
|
||||
ZVAL_OBJ(&parser->object, Z_OBJ_P(mythis));
|
||||
ZVAL_OBJ_COPY(&parser->object, Z_OBJ_P(mythis));
|
||||
|
||||
RETVAL_TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue