summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bcmath/bcmath.c25
-rw-r--r--ext/bcmath/php_bcmath.h5
2 files changed, 20 insertions, 10 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 4ec3f1d798..78a2521b8c 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -42,10 +42,10 @@ function_entry bcmath_functions[] = {
zend_module_entry bcmath_module_entry = {
"bcmath",
bcmath_functions,
- NULL,
- NULL,
+ PHP_MINIT(bcmath),
+ PHP_MSHUTDOWN(bcmath),
PHP_RINIT(bcmath),
- PHP_RSHUTDOWN(bcmath),
+ NULL,
PHP_MINFO(bcmath),
STANDARD_MODULE_PROPERTIES
};
@@ -58,21 +58,30 @@ ZEND_GET_MODULE(bcmath)
static long bc_precision;
#endif
-PHP_RINIT_FUNCTION(bcmath)
+PHP_MINIT_FUNCTION(bcmath)
{
init_numbers();
- if (cfg_get_long("bcmath.scale",&bc_precision)==FAILURE) {
- bc_precision=0;
- }
return SUCCESS;
}
-PHP_RSHUTDOWN_FUNCTION(bcmath)
+
+
+PHP_MSHUTDOWN_FUNCTION(bcmath)
{
destruct_numbers();
return SUCCESS;
}
+
+PHP_RINIT_FUNCTION(bcmath)
+{
+ if (cfg_get_long("bcmath.scale",&bc_precision)==FAILURE) {
+ bc_precision=0;
+ }
+ return SUCCESS;
+}
+
+
PHP_MINFO_FUNCTION(bcmath)
{
php_info_print_table_start();
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index df7512d842..724484743a 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -26,8 +26,9 @@
extern zend_module_entry bcmath_module_entry;
#define phpext_bcmath_ptr &bcmath_module_entry
-extern PHP_RINIT_FUNCTION(bcmath);
-extern PHP_RSHUTDOWN_FUNCTION(bcmath);
+PHP_MINIT_FUNCTION(bcmath);
+PHP_MSHUTDOWN_FUNCTION(bcmath);
+PHP_RINIT_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);
PHP_FUNCTION(bcadd);