From 1dbaae2795b756a3875c53da00b277f241cc04b8 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 15 Jun 2006 18:33:09 +0000 Subject: Added automatic module globals management --- ext/recode/recode.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ext/recode/recode.c') diff --git a/ext/recode/recode.c b/ext/recode/recode.c index 68494bbb39..cb9ad7d492 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -64,6 +64,7 @@ ZEND_END_MODULE_GLOBALS(recode) #endif ZEND_DECLARE_MODULE_GLOBALS(recode); +static PHP_GINIT_FUNCTION(recode); /* {{{ module stuff */ static zend_function_entry php_recode_functions[] = { @@ -83,22 +84,24 @@ zend_module_entry recode_module_entry = { NULL, PHP_MINFO(recode), NO_VERSION_YET, - STANDARD_MODULE_PROPERTIES + PHP_MODULE_GLOBALS(recode), + PHP_GINIT(recode), + NULL, + NULL, + STANDARD_MODULE_PROPERTIES_EX }; #ifdef COMPILE_DL_RECODE ZEND_GET_MODULE(recode) #endif -static void php_recode_init_globals (zend_recode_globals *rg) +static PHP_GINIT_FUNCTION(recode) { - rg->outer = NULL; + recode_globals->outer = NULL; } PHP_MINIT_FUNCTION(recode) { - ZEND_INIT_MODULE_GLOBALS(recode, php_recode_init_globals, NULL); - ReSG(outer) = recode_new_outer(false); if (ReSG(outer) == NULL) { return FAILURE; -- cgit v1.2.1