diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2003-05-28 09:40:32 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2003-05-28 09:40:32 +0000 |
commit | fb232d96c955ce65ec0e09897a282f540a3be37d (patch) | |
tree | e56095b07755d42fb84bcacdd500dbb7250e0ea2 /ext | |
parent | cad89fa5a0af21e175b9da773c1beb2f92093eb6 (diff) | |
download | php-git-fb232d96c955ce65ec0e09897a282f540a3be37d.tar.gz |
@fdf crash with ZTS builds fixed (see Bug #14877)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fdf/fdf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c index aaa0cf8b75..48f18d3f0b 100644 --- a/ext/fdf/fdf.c +++ b/ext/fdf/fdf.c @@ -125,10 +125,19 @@ static sapi_post_entry php_fdf_post_entry = { fdf_post_handler }; +static void php_fdf_init_globals(zend_fdf_globals *fdf_globals) +{ + memset(fdf_globals, 0, sizeof(*fdf_globals)); +} + + + /* {{{ PHP_MINIT_FUNCTION */ 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 */ @@ -160,6 +169,7 @@ PHP_MINIT_FUNCTION(fdf) REGISTER_LONG_CONSTANT("FDFUp", FDFUp, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFFormat", FDFFormat, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFValidate", FDFValidate, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("FDFKeystroke", FDFKeystroke, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFCalculate", FDFCalculate, CONST_CS | CONST_PERSISTENT); @@ -167,7 +177,7 @@ PHP_MINIT_FUNCTION(fdf) REGISTER_LONG_CONSTANT("FDFNormalAP", 1, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFRolloverAP", 2, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFDownAP", 3, CONST_CS | CONST_PERSISTENT); - + #ifdef PHP_WIN32 return SUCCESS; #else @@ -179,6 +189,7 @@ PHP_MINIT_FUNCTION(fdf) /* {{{ RINIT */ PHP_RINIT_FUNCTION(fdf) { + FDF_G(error) = FDFErcOK; return SUCCESS; } /* }}} */ |