xref: /php-src/ext/bcmath/php_bcmath.h (revision 68247c02)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Author: Andi Gutmans <andi@php.net>                                  |
14    +----------------------------------------------------------------------+
15 */
16 
17 #ifndef PHP_BCMATH_H
18 #define PHP_BCMATH_H
19 
20 #include "libbcmath/src/bcmath.h"
21 #include "zend_API.h"
22 
23 extern zend_module_entry bcmath_module_entry;
24 #define phpext_bcmath_ptr &bcmath_module_entry
25 
26 #include "php_version.h"
27 #define PHP_BCMATH_VERSION PHP_VERSION
28 
29 ZEND_BEGIN_MODULE_GLOBALS(bcmath)
30 	bc_num _zero_;
31 	bc_num _one_;
32 	bc_num _two_;
33 	int bc_precision;
34 ZEND_END_MODULE_GLOBALS(bcmath)
35 
36 #if defined(ZTS) && defined(COMPILE_DL_BCMATH)
37 ZEND_TSRMLS_CACHE_EXTERN()
38 #endif
39 
40 ZEND_EXTERN_MODULE_GLOBALS(bcmath)
41 #define BCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(bcmath, v)
42 
43 #endif /* PHP_BCMATH_H */
44