From fb38d301691243f58b49413f467566cf664cc8dd Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 10 Mar 2024 07:20:47 +0100 Subject: [PATCH 1/3] Remove unused zend_shutdown_constants() The zend_shutdown_constants() usage was removed in 21698c12fefc21acc7b2de2c54aa2b19cfaf3678 (memory leak) and in b80cb7bd2f721dad13a97a1300c6dc56934daaf7 (unicode support). --- UPGRADING.INTERNALS | 1 + Zend/zend_constants.c | 7 ------- Zend/zend_constants.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 1f2960b5d637a..9dfd29e093ecf 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -77,6 +77,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES void(*)(void *, size_t) to void(*)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) +* The function zend_shutdown_constants() has been removed. ======================== 2. Build system changes diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 6530c1f063dd8..ed649ba298592 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -116,13 +116,6 @@ void zend_register_standard_constants(void) null_const = zend_hash_str_find_ptr(EG(zend_constants), "NULL", sizeof("NULL")-1); } - -void zend_shutdown_constants(void) -{ - zend_hash_destroy(EG(zend_constants)); - free(EG(zend_constants)); -} - ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number) { zend_constant c; diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 736dbb0091085..33e51858430c1 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -71,7 +71,6 @@ BEGIN_EXTERN_C() void clean_module_constants(int module_number); void free_zend_constant(zval *zv); void zend_startup_constants(void); -void zend_shutdown_constants(void); void zend_register_standard_constants(void); ZEND_API bool zend_verify_const_access(zend_class_constant *c, zend_class_entry *ce); ZEND_API zval *zend_get_constant(zend_string *name); From edc4a812537256c58ca346507cac5fab24848a4b Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 10 Mar 2024 18:03:17 +0100 Subject: [PATCH 2/3] [skip ci] Update upgrading docs --- UPGRADING.INTERNALS | 2 -- 1 file changed, 2 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 9dfd29e093ecf..719041db48a4c 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -77,8 +77,6 @@ PHP 8.4 INTERNALS UPGRADE NOTES void(*)(void *, size_t) to void(*)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) -* The function zend_shutdown_constants() has been removed. - ======================== 2. Build system changes ======================== From 2735e3a8a5823fc2d13d21baf767a1aa80399e9f Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 10 Mar 2024 18:04:27 +0100 Subject: [PATCH 3/3] [skip ci] Fix CS back --- UPGRADING.INTERNALS | 1 + 1 file changed, 1 insertion(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 719041db48a4c..1f2960b5d637a 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -77,6 +77,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES void(*)(void *, size_t) to void(*)(void *, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) + ======================== 2. Build system changes ========================