summaryrefslogtreecommitdiff
path: root/ext/bcmath
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-06-15 18:33:09 +0000
committerDmitry Stogov <dmitry@php.net>2006-06-15 18:33:09 +0000
commit1dbaae2795b756a3875c53da00b277f241cc04b8 (patch)
treefd516b57354eb9480e89dcd0503fa990d3cc2068 /ext/bcmath
parentc3ed91477a011e494559d6f65301ef6b2e38cd22 (diff)
downloadphp-git-1dbaae2795b756a3875c53da00b277f241cc04b8.tar.gz
Added automatic module globals management
Diffstat (limited to 'ext/bcmath')
-rw-r--r--ext/bcmath/bcmath.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 1acd12e934..05bfb06642 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -32,6 +32,7 @@
#include "libbcmath/src/bcmath.h"
ZEND_DECLARE_MODULE_GLOBALS(bcmath);
+static PHP_GINIT_FUNCTION(bcmath);
/* {{{ arginfo */
static
@@ -127,7 +128,11 @@ zend_module_entry bcmath_module_entry = {
PHP_RSHUTDOWN(bcmath),
PHP_MINFO(bcmath),
NO_VERSION_YET,
- STANDARD_MODULE_PROPERTIES
+ PHP_MODULE_GLOBALS(bcmath),
+ PHP_GINIT(bcmath),
+ NULL,
+ NULL,
+ STANDARD_MODULE_PROPERTIES_EX
};
#ifdef COMPILE_DL_BCMATH
@@ -140,9 +145,9 @@ PHP_INI_BEGIN()
PHP_INI_END()
/* }}} */
-/* {{{ php_bcmath_init_globals
+/* {{{ PHP_GINIT_FUNCTION
*/
-static void php_bcmath_init_globals(zend_bcmath_globals *bcmath_globals)
+static PHP_GINIT_FUNCTION(bcmath)
{
bcmath_globals->bc_precision = 0;
}
@@ -152,8 +157,6 @@ static void php_bcmath_init_globals(zend_bcmath_globals *bcmath_globals)
*/
PHP_MINIT_FUNCTION(bcmath)
{
- ZEND_INIT_MODULE_GLOBALS(bcmath, php_bcmath_init_globals, NULL);
-
REGISTER_INI_ENTRIES();
return SUCCESS;