]> granicus.if.org Git - php/commitdiff
don't call php_module_startup() directly, use startup functions
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Feb 2007 19:19:14 +0000 (19:19 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Feb 2007 19:19:14 +0000 (19:19 +0000)
patch by Andrei Nigmatulin

sapi/cgi/cgi_main.c
sapi/cli/php_cli.c

index 4805f2ca482a5cda8eefe1b06f9106c82411b262..4598ddb1f13426216dee7e83341be326d2b9f190 100644 (file)
@@ -116,6 +116,7 @@ static pid_t pgroup;
 
 static char *php_optarg = NULL;
 static int php_optind = 1;
+static zend_module_entry cgi_module_entry;
 
 static const opt_struct OPTIONS[] = {
        {'a', 0, "interactive"},
@@ -542,7 +543,7 @@ static int sapi_cgi_deactivate(TSRMLS_D)
 
 static int php_cgi_startup(sapi_module_struct *sapi_module)
 {
-       if (php_module_startup(sapi_module, NULL, 0) == FAILURE) {
+       if (php_module_startup(sapi_module, &cgi_module_entry, 1) == FAILURE) {
                return FAILURE;
        }
        return SUCCESS;
@@ -1211,7 +1212,7 @@ int main(int argc, char *argv[])
        cgi_sapi_module.additional_functions = additional_functions;
 
        /* startup after we get the above ini override se we get things right */
-       if (php_module_startup(&cgi_sapi_module, &cgi_module_entry, 1) == FAILURE) {
+       if (cgi_sapi_module.startup(&cgi_sapi_module) == FAILURE) {
 #ifdef ZTS
                tsrm_shutdown();
 #endif
index f51185a6a00fc37c7372d53f411e960c13bad0aa..996a5674a16b223b6ccf9f78ca7be6226716b83c 100644 (file)
@@ -710,7 +710,7 @@ int main(int argc, char *argv[])
 #endif
 
        /* startup after we get the above ini override se we get things right */
-       if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) {
+       if (cli_sapi_module.startup(&cli_sapi_module)==FAILURE) {
                /* there is no way to see if we must call zend_ini_deactivate()
                 * since we cannot check if EG(ini_directives) has been initialised
                 * because the executor's constructor does not set initialize it.