mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Added automatic module globals management
This commit is contained in:
parent
c3ed91477a
commit
1dbaae2795
42 changed files with 375 additions and 334 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue