mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Made bcmath extension thread safe.
@Made bcmath extension thread safe. (Sander)
This commit is contained in:
parent
64a75d6d77
commit
f200f739d8
14 changed files with 186 additions and 202 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue