Get rid of the redundant global startup code

This commit is contained in:
Zeev Suraski 2001-07-24 20:30:37 +00:00
parent 612b3666a9
commit 536a53356d
7 changed files with 2 additions and 55 deletions

View File

@ -78,8 +78,6 @@ SAPI_API void sapi_startup(sapi_module_struct *sf)
#endif
reentrancy_startup();
php_global_startup_internal_extensions();
}
SAPI_API void sapi_shutdown(void)
@ -93,7 +91,6 @@ SAPI_API void sapi_shutdown(void)
tsrm_win32_shutdown();
#endif
php_global_shutdown_internal_extensions();
zend_hash_destroy(&known_post_content_types);
}

View File

@ -90,16 +90,6 @@ int php_startup_internal_extensions(void)
return php_startup_extensions(php_builtin_extensions, EXTCOUNT);
}
int php_global_startup_internal_extensions(void)
{
return php_global_startup_extensions(php_builtin_extensions, EXTCOUNT);
}
int php_global_shutdown_internal_extensions(void)
{
return php_global_shutdown_extensions(php_builtin_extensions, EXTCOUNT);
}
/*
* Local variables:

View File

@ -768,43 +768,6 @@ int php_startup_extensions(zend_module_entry **ptr, int count)
}
/* }}} */
/* {{{ php_global_startup_extensions
*/
int php_global_startup_extensions(zend_module_entry **ptr, int count)
{
zend_module_entry **end = ptr+count;
while (ptr < end) {
if (*ptr) {
if ((*ptr)->global_startup_func &&
(*ptr)->global_startup_func()==FAILURE) {
return FAILURE;
}
}
ptr++;
}
return SUCCESS;
}
/* }}} */
/* {{{ php_global_shutdown_extensions
*/
int php_global_shutdown_extensions(zend_module_entry **ptr, int count)
{
zend_module_entry **end = ptr+count;
while (ptr < end) {
if (*ptr) {
if ((*ptr)->global_shutdown_func &&
(*ptr)->global_shutdown_func()==FAILURE) {
return FAILURE;
}
}
ptr++;
}
return SUCCESS;
}
/* }}} */
/* {{{ php_module_startup
*/
@ -1296,6 +1259,7 @@ PHPAPI void php_handle_aborted_connection(void)
PLS_FETCH();
PG(connection_status) = PHP_CONNECTION_ABORTED;
php_output_set_status(0);
if (!PG(ignore_user_abort)) {
zend_bailout();

View File

@ -266,8 +266,6 @@ int cfgparse(void);
/* functions */
int php_startup_internal_extensions(void);
int php_global_startup_internal_extensions(void);
int php_global_shutdown_internal_extensions(void);
int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp) (const void *, const void *));

View File

@ -37,8 +37,6 @@ PHPAPI void php_module_shutdown_for_exec(void);
PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
PHPAPI int php_startup_extensions(zend_module_entry **ptr, int count);
PHPAPI int php_global_startup_extensions(zend_module_entry **ptr, int count);
PHPAPI int php_global_shutdown_extensions(zend_module_entry **ptr, int count);
PHPAPI int php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC);
PHPAPI int php_handle_special_queries(SLS_D PLS_DC);

View File

@ -312,6 +312,7 @@ static void php_apache_request_shutdown(void *dummy)
SLS_FETCH();
APLS_FETCH();
php_output_set_status(0);
SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */
if (AP(in_request)) {
AP(in_request) = 0;

View File

@ -272,7 +272,6 @@ JNIEXPORT void JNICALL Java_net_php_servlet_shutdown
(JNIEnv *jenv, jobject self)
{
php_module_shutdown();
php_global_shutdown_extensions(additional_php_extensions, EXTCOUNT);
#ifdef ZTS
tsrm_shutdown();
#endif