Skip to content

Commit c76b33d

Browse files
authored
zend_types: Remove the unused Z_GC_*() macros (#22303)
1 parent 10bdc08 commit c76b33d

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ PHP 8.6 INTERNALS UPGRADE NOTES
104104
. The deprecated Z_IMMUTABLE(), Z_IMMUTABLE_P(), Z_OPT_IMMUTABLE(), and
105105
Z_OPT_IMMUTABLE_P() macros have been removed. Check for
106106
IS_ARRAY && !REFCOUNTED directly.
107+
. The unused Z_GC_*() macros have been removed. Use the corresponding
108+
GC_*() macro on the result of Z_COUNTED().
107109
. The zend_binary_zval_strcmp() and zend_binary_zval_strncmp() functions
108110
have been removed, because they are unsafe by relying on the zvals
109111
having a specific type. Use zend_binary_strcmp() / zend_binary_strncmp(),

Zend/zend_types.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -864,17 +864,6 @@ static zend_always_inline uint32_t zend_gc_delref_ex(zend_refcounted_h *p, uint3
864864
} \
865865
} while (0)
866866

867-
#define Z_GC_TYPE(zval) GC_TYPE(Z_COUNTED(zval))
868-
#define Z_GC_TYPE_P(zval_p) Z_GC_TYPE(*(zval_p))
869-
870-
#define Z_GC_FLAGS(zval) GC_FLAGS(Z_COUNTED(zval))
871-
#define Z_GC_FLAGS_P(zval_p) Z_GC_FLAGS(*(zval_p))
872-
873-
#define Z_GC_INFO(zval) GC_INFO(Z_COUNTED(zval))
874-
#define Z_GC_INFO_P(zval_p) Z_GC_INFO(*(zval_p))
875-
#define Z_GC_TYPE_INFO(zval) GC_TYPE_INFO(Z_COUNTED(zval))
876-
#define Z_GC_TYPE_INFO_P(zval_p) Z_GC_TYPE_INFO(*(zval_p))
877-
878867
#define GC_NULL (IS_NULL | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT))
879868
#define GC_STRING (IS_STRING | (GC_NOT_COLLECTABLE << GC_FLAGS_SHIFT))
880869
#define GC_ARRAY IS_ARRAY

0 commit comments

Comments
 (0)