diff options
author | Sander Roobol <sander@php.net> | 2002-11-22 09:27:08 +0000 |
---|---|---|
committer | Sander Roobol <sander@php.net> | 2002-11-22 09:27:08 +0000 |
commit | 0debfe11635fd663fff03efbfba219d95e95798f (patch) | |
tree | ddc3cf0eab3ab68aa93136a857055862f18d89c8 /ext/bcmath/php_bcmath.h | |
parent | 3652c75a5d80375650d67c31542382ad1f855641 (diff) | |
download | php-git-0debfe11635fd663fff03efbfba219d95e95798f.tar.gz |
MFH
@Made bcmath extension thread safe. (Sander)
Diffstat (limited to 'ext/bcmath/php_bcmath.h')
-rw-r--r-- | ext/bcmath/php_bcmath.h | 21 |
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); |