File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -638,6 +638,26 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) {
638
638
#define GC_TRY_ADDREF (p ) zend_gc_try_addref(&(p)->gc)
639
639
#define GC_TRY_DELREF (p ) zend_gc_try_delref(&(p)->gc)
640
640
641
+ #define GC_DTOR (p ) \
642
+ do { \
643
+ zend_refcounted_h *_p = &(p)->gc; \
644
+ if (zend_gc_delref(_p) == 0) { \
645
+ rc_dtor_func((zend_refcounted *)_p); \
646
+ } else { \
647
+ gc_check_possible_root((zend_refcounted *)_p); \
648
+ } \
649
+ } while (0)
650
+
651
+ #define GC_DTOR_NO_REF (p ) \
652
+ do { \
653
+ zend_refcounted_h *_p = &(p)->gc; \
654
+ if (zend_gc_delref(_p) == 0) { \
655
+ rc_dtor_func((zend_refcounted *)_p); \
656
+ } else { \
657
+ gc_check_possible_root_no_ref((zend_refcounted *)_p); \
658
+ } \
659
+ } while (0)
660
+
641
661
#define GC_TYPE_MASK 0x0000000f
642
662
#define GC_FLAGS_MASK 0x000003f0
643
663
#define GC_INFO_MASK 0xfffffc00
You can’t perform that action at this time.
0 commit comments