]> granicus.if.org Git - php/commitdiff
- Fix a bug where function's didn't work anymore in multi-threaded
authorAndi Gutmans <andi@php.net>
Sun, 23 Dec 2001 18:39:52 +0000 (18:39 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 23 Dec 2001 18:39:52 +0000 (18:39 +0000)
- servers after the latest startup changes.

Zend/zend.c

index be547ec907b642b35f77d52a2c3c5c5e9bd5e450..c17d494e97fe7c76d9c8dc3d38968ef399918e21 100644 (file)
@@ -474,6 +474,8 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
 
 #ifdef ZTS
        tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
+       *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
+       *GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
 #endif
 
        return SUCCESS;
@@ -490,10 +492,10 @@ void zend_shutdown(TSRMLS_D)
 #endif
        zend_destroy_rsrc_list_dtors();
        zend_hash_destroy(&module_registry);
-#ifndef ZTS
+
        zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
        zend_hash_destroy(GLOBAL_CLASS_TABLE);
-#endif
+
        zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
        free(GLOBAL_AUTO_GLOBALS_TABLE);
        zend_shutdown_extensions(TSRMLS_C);