tony2001 Tue Feb 20 19:20:41 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: MFH: make use of startup hooks http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.26&r2=1.267.2.15.2.27&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.26 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.27 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.26 Mon Feb 19 23:52:13 2007 +++ php-src/sapi/cgi/cgi_main.c Tue Feb 20 19:20:41 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.26 2007/02/19 23:52:13 iliaa Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.27 2007/02/20 19:20:41 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -119,6 +119,7 @@ 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"}, @@ -567,7 +568,7 @@ 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; @@ -1262,7 +1263,7 @@ cgi_sapi_module.executable_location = argv[0]; /* 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 http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.13&r2=1.129.2.13.2.14&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.13 php-src/sapi/cli/php_cli.c:1.129.2.13.2.14 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.13 Thu Feb 8 16:55:34 2007 +++ php-src/sapi/cli/php_cli.c Tue Feb 20 19:20:41 2007 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.13 2007/02/08 16:55:34 helly Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.14 2007/02/20 19:20:41 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -698,7 +698,7 @@ #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.
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php