* Centralized shutdown

* Change shutdown order again
This commit is contained in:
Zeev Suraski 1999-06-05 20:00:00 +00:00
parent a1b42e3f5e
commit ed06a70f7f
4 changed files with 20 additions and 1 deletions

View 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);
}

View 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();

View 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));

View 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);