File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ END_EXTERN_C()
140140 } \
141141 } while (0)
142142
143+ #define GC_REMOVE_ZOBJ_FROM_BUFFER (z ) do { \
144+ if (GC_ADDRESS((z)->gc.u.v.buffer)) { \
145+ gc_remove_zval_from_buffer(&(z)->gc TSRMLS_CC); \
146+ } \
147+ } while (0)
148+
143149static zend_always_inline void gc_zval_check_possible_root (zval * z TSRMLS_DC )
144150{
145151 if (Z_TYPE_P (z ) == IS_ARRAY || Z_TYPE_P (z ) == IS_OBJECT ) {
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
5555 obj -> gc .refcount -- ;
5656
5757 if (obj -> gc .refcount == 0 ) {
58- gc_remove_zval_from_buffer (( zend_refcounted * ) obj TSRMLS_CC );
58+ GC_REMOVE_ZOBJ_FROM_BUFFER ( obj TSRMLS_CC );
5959 }
6060 }
6161 }
@@ -86,7 +86,7 @@ ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects
8686 zend_object * obj = objects -> object_buckets [i ];
8787
8888 if (IS_VALID (obj )) {
89- gc_remove_zval_from_buffer (( zend_refcounted * ) obj TSRMLS_CC );
89+ GC_REMOVE_ZOBJ_FROM_BUFFER ( obj TSRMLS_CC );
9090 objects -> object_buckets [i ] = SET_INVALID (obj );
9191 if (obj -> handlers -> free_obj ) {
9292 obj -> handlers -> free_obj (obj TSRMLS_CC );
You can’t perform that action at this time.
0 commit comments