Skip to content

Commit 2b29ba4

Browse files
committed
Revert "Fixed compilation on PHP 8.3-dev (php/php-src@b0d8c10)"
This reverts commit 40a6626. The change related to this commit was reverted by php/php-src#11604.
1 parent b6a38bc commit 2b29ba4

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/prepare.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -770,41 +770,29 @@ static inline void pmmpthread_prepare_constants(const pmmpthread_ident_t* source
770770
zend_string *name;
771771

772772
ZEND_HASH_FOREACH_STR_KEY_PTR(PMMPTHREAD_EG(source->ls, zend_constants), name, zconstant) {
773-
#if PHP_VERSION_ID < 80300
774773
if (zconstant->name) {
775-
#endif
776774
if (Z_TYPE(zconstant->value) == IS_RESOURCE){
777775
//we can't copy these
778776
continue;
779777
} else {
780778
zend_constant constant;
781779

782780
if (!pmmpthread_constant_exists(name)) {
783-
zend_string *name_copy = pmmpthread_copy_string(name);
784-
#if PHP_VERSION_ID < 80300
785-
constant.name = name_copy;
786-
#endif
781+
constant.name = pmmpthread_copy_string(name);
787782

788783
if (pmmpthread_copy_zval(source, &constant.value, &zconstant->value) != SUCCESS) {
789784
zend_error_noreturn(
790785
E_CORE_ERROR,
791786
"pmmpthread encountered an unknown non-copyable constant %s of type %s",
792-
ZSTR_VAL(name_copy),
787+
ZSTR_VAL(zconstant->name),
793788
zend_zval_type_name(&zconstant->value)
794789
);
795790
}
796791
ZEND_CONSTANT_SET_FLAGS(&constant, ZEND_CONSTANT_FLAGS(zconstant), ZEND_CONSTANT_MODULE_NUMBER(zconstant));
797-
zend_register_constant(
798-
#if PHP_VERSION_ID >= 80300
799-
name_copy,
800-
#endif
801-
&constant
802-
);
792+
zend_register_constant(&constant);
803793
}
804794
}
805-
#if PHP_VERSION_ID < 80300
806795
}
807-
#endif
808796
} ZEND_HASH_FOREACH_END();
809797
} /* }}} */
810798

0 commit comments

Comments
 (0)