From 1d0f55315e08d0fd7a9f9f4e7c4595e3f9d7a7f4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 28 Aug 2020 09:57:11 +0200 Subject: Store incomplete_class entry as normal global I don't see any reason why this needs to live in a thread-safe global, unlikely all other class entries. --- ext/standard/basic_functions.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ext/standard/basic_functions.c') diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index b2b30a05e4..9eeed75b04 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -108,8 +108,6 @@ PHPAPI php_basic_globals basic_globals; #include "streamsfuncs.h" #include "basic_functions_arginfo.h" -static zend_class_entry *incomplete_class_entry = NULL; - typedef struct _user_tick_function_entry { zval *arguments; int arg_count; @@ -220,7 +218,6 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p) /* {{{ */ memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))); #endif - BG(incomplete_class) = incomplete_class_entry; BG(page_uid) = -1; BG(page_gid) = -1; } @@ -285,7 +282,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */ #endif #endif - BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(); + php_register_incomplete_class(); REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CONNECTION_NORMAL", PHP_CONNECTION_NORMAL, CONST_CS | CONST_PERSISTENT); -- cgit v1.2.1