summaryrefslogtreecommitdiff
path: root/ext/bcmath/php_bcmath.h
diff options
context:
space:
mode:
authorSander Roobol <sander@php.net>2002-11-22 09:25:29 +0000
committerSander Roobol <sander@php.net>2002-11-22 09:25:29 +0000
commitf200f739d8089ac0156ea4064696d32fff45692c (patch)
tree5ba86c6a3ffcdd1229eb043df4515e345fe383dc /ext/bcmath/php_bcmath.h
parent64a75d6d7714e199814a67980abdd2672c69ba07 (diff)
downloadphp-git-f200f739d8089ac0156ea4064696d32fff45692c.tar.gz
Made bcmath extension thread safe.
@Made bcmath extension thread safe. (Sander)
Diffstat (limited to 'ext/bcmath/php_bcmath.h')
-rw-r--r--ext/bcmath/php_bcmath.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index bf57c25e88..35299d3cc9 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -23,9 +23,30 @@
#if WITH_BCMATH
+#include "libbcmath/src/bcmath.h"
+
+ZEND_BEGIN_MODULE_GLOBALS(bcmath)
+ bc_num _zero_;
+ bc_num _one_;
+ bc_num _two_;
+ZEND_END_MODULE_GLOBALS(bcmath)
+
+#if ZTS
+# define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
+extern int bcmath_globals_id;
+#else
+# define BCG(v) (bcmath_globals.v)
+extern zend_bcmath_globals bcmath_globals;
+#endif
+
+#define BC
+
extern zend_module_entry bcmath_module_entry;
#define phpext_bcmath_ptr &bcmath_module_entry
+#if ZTS
+PHP_MINIT_FUNCTION(bcmath);
+#endif
PHP_RINIT_FUNCTION(bcmath);
PHP_RSHUTDOWN_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);