mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Re-add GC_DTOR and GC_DTOR_NO_REF
This commit is contained in:
parent
d5484bf115
commit
c796ce5713
1 changed files with 20 additions and 0 deletions
|
@ -638,6 +638,26 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) {
|
|||
#define GC_TRY_ADDREF(p) zend_gc_try_addref(&(p)->gc)
|
||||
#define GC_TRY_DELREF(p) zend_gc_try_delref(&(p)->gc)
|
||||
|
||||
#define GC_DTOR(p) \
|
||||
do { \
|
||||
zend_refcounted_h *_p = &(p)->gc; \
|
||||
if (zend_gc_delref(_p) == 0) { \
|
||||
rc_dtor_func((zend_refcounted *)_p); \
|
||||
} else { \
|
||||
gc_check_possible_root((zend_refcounted *)_p); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GC_DTOR_NO_REF(p) \
|
||||
do { \
|
||||
zend_refcounted_h *_p = &(p)->gc; \
|
||||
if (zend_gc_delref(_p) == 0) { \
|
||||
rc_dtor_func((zend_refcounted *)_p); \
|
||||
} else { \
|
||||
gc_check_possible_root_no_ref((zend_refcounted *)_p); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define GC_TYPE_MASK 0x0000000f
|
||||
#define GC_FLAGS_MASK 0x000003f0
|
||||
#define GC_INFO_MASK 0xfffffc00
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue