]> granicus.if.org Git - php/commitdiff
* Centralized shutdown
authorZeev Suraski <zeev@php.net>
Sat, 5 Jun 1999 20:00:00 +0000 (20:00 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 5 Jun 1999 20:00:00 +0000 (20:00 +0000)
* Change shutdown order again

Zend/zend.c
Zend/zend.h
Zend/zend_compile.c
Zend/zend_compile.h

index 7e5cd91775ff58fe606d03f4fd7a16f9a3ef4293..ef9a39451bfdf77cf437b28d07ac601cc6b1b90d 100644 (file)
@@ -358,3 +358,19 @@ ZEND_API char *get_zend_version()
 {
        return zend_version_info;
 }
+
+
+void zend_activate(CLS_D ELS_DC)
+{
+       init_compiler(CLS_C ELS_CC);
+       init_executor(CLS_C ELS_CC);
+       startup_scanner(CLS_C);
+}
+
+void zend_deactivate(CLS_D ELS_DC)
+{
+       zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
+       shutdown_scanner(CLS_C);
+       shutdown_executor(ELS_C);
+       shutdown_compiler(CLS_C);
+}
index d4745ce7c943cfac825b5117b27fb57db39c6502..ece884f84a459f55a69019f6c8f98599df9853c0 100644 (file)
@@ -173,6 +173,7 @@ typedef struct _zend_utility_values {
 
 int zend_startup(zend_utility_functions *utility_functions, char **extensions);
 void zend_shutdown();
+
 void zend_set_utility_values(zend_utility_values *utility_values);
 BEGIN_EXTERN_C()
 ZEND_API void zend_bailout();
index ae1e6d4d52153117328a47f3cab0743a00b50cda..334213b7823fb6d1d65bf9120886169b9fe25eea 100644 (file)
@@ -73,7 +73,6 @@ void init_compiler(CLS_D ELS_DC)
 
 void shutdown_compiler(CLS_D)
 {
-       zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
        zend_stack_destroy(&CG(bp_stack));
        zend_stack_destroy(&CG(function_call_stack));
        zend_stack_destroy(&CG(switch_cond_stack));
index 7bc619336180833d4ec165c3de0775eb04593408..75a3f1ce37fe458e6faa0cbb226d69d53ff0b570 100644 (file)
@@ -189,6 +189,9 @@ void shutdown_compiler(CLS_D);
 BEGIN_EXTERN_C()
 extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
 
+void zend_activate(CLS_D ELS_DC);
+void zend_deactivate(CLS_D ELS_DC);
+
 int lex_scan(zval *zendlval CLS_DC);
 void startup_scanner(CLS_D);
 void shutdown_scanner(CLS_D);