summaryrefslogtreecommitdiff
path: root/ext/fdf/fdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fdf/fdf.c')
-rw-r--r--ext/fdf/fdf.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index 3fe953b956..252a476ad1 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -318,6 +318,9 @@ zend_function_entry fdf_functions[] = {
};
/* }}} */
+ZEND_DECLARE_MODULE_GLOBALS(fdf)
+static PHP_GINIT_FUNCTION(fdf);
+
zend_module_entry fdf_module_entry = {
STANDARD_MODULE_HEADER,
"fdf",
@@ -328,15 +331,17 @@ zend_module_entry fdf_module_entry = {
NULL,
PHP_MINFO(fdf),
NO_VERSION_YET,
- STANDARD_MODULE_PROPERTIES
+ PHP_MODULE_GLOBALS(fdf),
+ PHP_GINIT(fdf),
+ NULL,
+ NULL,
+ STANDARD_MODULE_PROPERTIES_EX
};
#ifdef COMPILE_DL_FDF
ZEND_GET_MODULE(fdf)
#endif
-ZEND_DECLARE_MODULE_GLOBALS(fdf)
-
#define FDF_SUCCESS do { FDF_G(error)=FDFErcOK; RETURN_TRUE;} while(0)
#define FDF_FAILURE(err) do { FDF_G(error)=err; RETURN_FALSE;} while(0)
@@ -356,7 +361,7 @@ static sapi_post_entry php_fdf_post_entry = {
fdf_post_handler
};
-static void php_fdf_init_globals(zend_fdf_globals *fdf_globals)
+static PHP_GINIT_FUNCTION(fdf)
{
memset(fdf_globals, 0, sizeof(*fdf_globals));
}
@@ -367,8 +372,6 @@ static void php_fdf_init_globals(zend_fdf_globals *fdf_globals)
*/
PHP_MINIT_FUNCTION(fdf)
{
- ZEND_INIT_MODULE_GLOBALS(fdf, php_fdf_init_globals, NULL);
-
le_fdf = zend_register_list_destructors_ex(phpi_FDFClose, NULL, "fdf", module_number);
/* add handler for Acrobat FDF form post requests */