Skip to content

Commit e24bf34

Browse files
committed
zend_types: Remove deprecated Z_OPT_IMMUTABLE() and Z_IMMUTABLE()
1 parent 1daa222 commit e24bf34

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ PHP 8.6 INTERNALS UPGRADE NOTES
100100
offsetof() directly.
101101
. The deprecated Z_COPYABLE(), Z_COPYABLE_P(), Z_OPT_COPYABLE(), and
102102
Z_OPT_COPYABLE_P() macros have been removed. Check for IS_ARRAY directly.
103+
. The deprecated Z_IMMUTABLE(), Z_IMMUTABLE_P(), Z_OPT_IMMUTABLE(), and
104+
Z_OPT_IMMUTABLE_P() macros have been removed. Check for
105+
IS_ARRAY && !REFCOUNTED directly.
103106

104107
========================
105108
2. Build system changes

Zend/zend_types.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -944,12 +944,6 @@ static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) {
944944
#define Z_COLLECTABLE(zval) ((Z_TYPE_FLAGS(zval) & IS_TYPE_COLLECTABLE) != 0)
945945
#define Z_COLLECTABLE_P(zval_p) Z_COLLECTABLE(*(zval_p))
946946

947-
/* deprecated: (IMMUTABLE is the same as IS_ARRAY && !REFCOUNTED) */
948-
#define Z_IMMUTABLE(zval) (Z_TYPE_INFO(zval) == IS_ARRAY)
949-
#define Z_IMMUTABLE_P(zval_p) Z_IMMUTABLE(*(zval_p))
950-
#define Z_OPT_IMMUTABLE(zval) Z_IMMUTABLE(zval_p)
951-
#define Z_OPT_IMMUTABLE_P(zval_p) Z_IMMUTABLE(*(zval_p))
952-
953947
/* the following Z_OPT_* macros make better code when Z_TYPE_INFO accessed before */
954948
#define Z_OPT_TYPE(zval) (Z_TYPE_INFO(zval) & Z_TYPE_MASK)
955949
#define Z_OPT_TYPE_P(zval_p) Z_OPT_TYPE(*(zval_p))

0 commit comments

Comments
 (0)