diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-06-13 13:12:20 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-06-13 13:12:20 +0000 |
| commit | 943960c324597281c02c42ae2ead2c2d7ef01be7 (patch) | |
| tree | 52a64885afab0efae220d8bd3eb2867b1022f8e7 /ext/recode/recode.c | |
| parent | 2cbde06400d2caf58d7f789b828f8d663980c8d2 (diff) | |
| download | php-git-943960c324597281c02c42ae2ead2c2d7ef01be7.tar.gz | |
Added automatic module globals management
Diffstat (limited to 'ext/recode/recode.c')
| -rw-r--r-- | ext/recode/recode.c | 13 |
1 files changed, 8 insertions, 5 deletions
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; |
