diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-17 12:34:04 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-17 16:36:56 +0200 |
commit | 15846ff115722b2f95d699abf07141d774b0e2cd (patch) | |
tree | 0be3155ce95856e82c4a0cf4c694ab0c6df49e62 /Zend/zend_inheritance.c | |
parent | b516566b84c210ce6ceddeb238e45d4b1bcb32ce (diff) | |
download | php-git-15846ff115722b2f95d699abf07141d774b0e2cd.tar.gz |
Add ZVAL_OBJ_COPY macro
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r-- | Zend/zend_inheritance.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index b6a3a891b2..7cee42085b 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -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, |