Skip to content

Commit 479edcc

Browse files
committed
Add GC_DTOR_NOGC() macro function
1 parent 103e802 commit 479edcc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Zend/zend_types.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,14 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) {
721721
} \
722722
} while (0)
723723

724+
#define GC_DTOR_NOGC(p) \
725+
do { \
726+
zend_refcounted_h *_p = &(p)->gc; \
727+
if (zend_gc_delref(_p) == 0) { \
728+
rc_dtor_func((zend_refcounted *)_p); \
729+
} \
730+
} while (0)
731+
724732
#define GC_DTOR_NO_REF(p) \
725733
do { \
726734
zend_refcounted_h *_p = &(p)->gc; \

0 commit comments

Comments
 (0)