mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +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
|
@ -2416,8 +2416,7 @@ static void check_unrecoverable_load_failure(zend_class_entry *ce) {
|
|||
zend_string *exception_str;
|
||||
zval exception_zv;
|
||||
ZEND_ASSERT(EG(exception) && "Exception must have been thrown");
|
||||
ZVAL_OBJ(&exception_zv, EG(exception));
|
||||
Z_ADDREF(exception_zv);
|
||||
ZVAL_OBJ_COPY(&exception_zv, EG(exception));
|
||||
zend_clear_exception();
|
||||
exception_str = zval_get_string(&exception_zv);
|
||||
zend_error_noreturn(E_ERROR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue