From d946ca1d7f90aa94cb0ddc57d091cce48edc817d Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 9 Jan 2005 16:19:11 +0000 Subject: [PATCH] MFH: - Rationalize code a bit --- Zend/zend.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 5119733426..b0d60601e3 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -494,21 +494,19 @@ static void zend_new_thread_end_handler(THREAD_T thread_id TSRMLS_DC) zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC); } -#endif - -static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC) +static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC) { - start_memory_manager(TSRMLS_C); + shutdown_memory_manager(0, 1 TSRMLS_CC); } +#endif -#ifdef ZTS -static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC) + +static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC) { - shutdown_memory_manager(0, 1 TSRMLS_CC); + start_memory_manager(TSRMLS_C); } -#endif #if defined(__FreeBSD__) || defined(__DragonFly__) @@ -705,6 +703,7 @@ void zend_shutdown(TSRMLS_D) zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE); free(GLOBAL_AUTO_GLOBALS_TABLE); + zend_shutdown_extensions(TSRMLS_C); free(zend_version_info); -- 2.50.1