From 1254969274a977e081753327769e5d4f90e736a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 12 Oct 2022 22:43:36 +0200 Subject: [PATCH] Declare remaining Zend constants in stubs (#9730) --- Zend/zend_constants.c | 10 ---------- Zend/zend_constants.stub.php | 30 ++++++++++++++++++++++++++++++ Zend/zend_constants_arginfo.h | 9 ++++++++- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 3fc8efed57c..f002e321d8b 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -111,16 +111,6 @@ void zend_register_standard_constants(void) { register_zend_constants_symbols(0); - REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_PROVIDE_OBJECT", DEBUG_BACKTRACE_PROVIDE_OBJECT, CONST_PERSISTENT | CONST_CS); - REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_IGNORE_ARGS", DEBUG_BACKTRACE_IGNORE_ARGS, CONST_PERSISTENT | CONST_CS); - REGISTER_MAIN_BOOL_CONSTANT("ZEND_THREAD_SAFE", ZTS_V, CONST_PERSISTENT | CONST_CS); - REGISTER_MAIN_BOOL_CONSTANT("ZEND_DEBUG_BUILD", ZEND_DEBUG, CONST_PERSISTENT | CONST_CS); - - /* Special constants true/false/null. */ - REGISTER_MAIN_BOOL_CONSTANT("TRUE", 1, CONST_PERSISTENT); - REGISTER_MAIN_BOOL_CONSTANT("FALSE", 0, CONST_PERSISTENT); - REGISTER_MAIN_NULL_CONSTANT("NULL", CONST_PERSISTENT); - true_const = zend_hash_str_find_ptr(EG(zend_constants), "TRUE", sizeof("TRUE")-1); false_const = zend_hash_str_find_ptr(EG(zend_constants), "FALSE", sizeof("FALSE")-1); null_const = zend_hash_str_find_ptr(EG(zend_constants), "NULL", sizeof("NULL")-1); diff --git a/Zend/zend_constants.stub.php b/Zend/zend_constants.stub.php index 289f6fb0531..f28a50ea6fd 100644 --- a/Zend/zend_constants.stub.php +++ b/Zend/zend_constants.stub.php @@ -97,3 +97,33 @@ const E_USER_DEPRECATED = UNKNOWN; * @cvalue E_ALL */ const E_ALL = UNKNOWN; + +/** + * @var int + * @cvalue DEBUG_BACKTRACE_PROVIDE_OBJECT + */ +const DEBUG_BACKTRACE_PROVIDE_OBJECT = UNKNOWN; +/** + * @var int + * @cvalue DEBUG_BACKTRACE_IGNORE_ARGS + */ +const DEBUG_BACKTRACE_IGNORE_ARGS = UNKNOWN; +/** + * @var bool + * @cvalue ZTS_V + */ +const ZEND_THREAD_SAFE = UNKNOWN; +/** + * @var bool + * @cvalue ZEND_DEBUG + */ +const ZEND_DEBUG_BUILD = UNKNOWN; + +/* Special constants true/false/null. */ + +/** @var bool */ +const TRUE = true; +/** @var bool */ +const FALSE = false; +/** @var null */ +const NULL = null; diff --git a/Zend/zend_constants_arginfo.h b/Zend/zend_constants_arginfo.h index 3cfaee30143..c2b24c2edc4 100644 --- a/Zend/zend_constants_arginfo.h +++ b/Zend/zend_constants_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 50b960193f55c7b09316355a0c0ae1d572ca9694 */ + * Stub hash: df76f4e5a735baba96c4ac3538e9e3e48d934f0f */ @@ -21,4 +21,11 @@ static void register_zend_constants_symbols(int module_number) REGISTER_LONG_CONSTANT("E_DEPRECATED", E_DEPRECATED, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("DEBUG_BACKTRACE_PROVIDE_OBJECT", DEBUG_BACKTRACE_PROVIDE_OBJECT, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("DEBUG_BACKTRACE_IGNORE_ARGS", DEBUG_BACKTRACE_IGNORE_ARGS, CONST_PERSISTENT); + REGISTER_BOOL_CONSTANT("ZEND_THREAD_SAFE", ZTS_V, CONST_PERSISTENT); + REGISTER_BOOL_CONSTANT("ZEND_DEBUG_BUILD", ZEND_DEBUG, CONST_PERSISTENT); + REGISTER_BOOL_CONSTANT("TRUE", true, CONST_PERSISTENT); + REGISTER_BOOL_CONSTANT("FALSE", false, CONST_PERSISTENT); + REGISTER_NULL_CONSTANT("NULL", CONST_PERSISTENT); }