From: foobar Date: Sun, 9 Jan 2005 16:19:11 +0000 (+0000) Subject: MFH: - Rationalize code a bit X-Git-Tag: php-5.0.4RC1~377 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d946ca1d7f90aa94cb0ddc57d091cce48edc817d;p=php MFH: - Rationalize code a bit --- 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);