stas Wed Aug 8 21:12:41 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/embed php_embed.c Log: fix embed TSRM startup http://cvs.php.net/viewvc.cgi/php-src/sapi/embed/php_embed.c?r1=1.1.2.5.2.2&r2=1.1.2.5.2.3&diff_format=u Index: php-src/sapi/embed/php_embed.c diff -u php-src/sapi/embed/php_embed.c:1.1.2.5.2.2 php-src/sapi/embed/php_embed.c:1.1.2.5.2.3 --- php-src/sapi/embed/php_embed.c:1.1.2.5.2.2 Mon Jan 1 09:46:52 2007 +++ php-src/sapi/embed/php_embed.c Wed Aug 8 21:12:41 2007 @@ -15,7 +15,7 @@ | Author: Edin Kadribasic <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_embed.c,v 1.1.2.5.2.2 2007/01/01 09:46:52 sebastian Exp $ */ +/* $Id: php_embed.c,v 1.1.2.5.2.3 2007/08/08 21:12:41 stas Exp $ */ #include "php_embed.h" @@ -137,11 +137,8 @@ { zend_llist global_vars; #ifdef ZTS - zend_compiler_globals *compiler_globals; - zend_executor_globals *executor_globals; - php_core_globals *core_globals; - sapi_globals_struct *sapi_globals; - void ***tsrm_ls; + sapi_globals_struct *sapi_globals = NULL; + void ***tsrm_ls = NULL; #endif #ifdef HAVE_SIGNAL_H @@ -166,24 +163,21 @@ tsrm_startup(1, 1, 0, NULL); #endif -#ifdef ZTS - compiler_globals = ts_resource(compiler_globals_id); - executor_globals = ts_resource(executor_globals_id); - core_globals = ts_resource(core_globals_id); - sapi_globals = ts_resource(sapi_globals_id); - tsrm_ls = ts_resource(0); - *ptsrm_ls = tsrm_ls; -#endif - sapi_startup(&php_embed_module); + if (argv) { + php_embed_module.executable_location = argv[0]; + } + if (php_embed_module.startup(&php_embed_module)==FAILURE) { return FAILURE; } - if (argv) { - php_embed_module.executable_location = argv[0]; - } +#ifdef ZTS + sapi_globals = ts_resource(sapi_globals_id); + tsrm_ls = ts_resource(0); + *ptsrm_ls = tsrm_ls; +#endif zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php