summaryrefslogtreecommitdiff
path: root/ext/bcmath
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-02-04 21:01:54 +0000
committerMarcus Boerger <helly@php.net>2003-02-04 21:01:54 +0000
commit1af77be5fd98a164ae9873ed2e382db0953251fa (patch)
tree6aaa7e32c1bb46dba683ceadfdf8358885a303dd /ext/bcmath
parent13f8b211c417574d3e4f1f54d8a5a37b15e2a66b (diff)
downloadphp-git-1af77be5fd98a164ae9873ed2e382db0953251fa.tar.gz
fix ZTS build
Diffstat (limited to 'ext/bcmath')
-rw-r--r--ext/bcmath/bcmath.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 752af2ae9f..f3a4d7421c 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -113,7 +113,7 @@ PHP_MINFO_FUNCTION(bcmath)
/* {{{ php_str2num
Convert to bc_num detecting scale */
-static void php_str2num(bc_num *num, char *str) {
+static void php_str2num(bc_num *num, char *str TSRMLS_DC) {
char *p;
if (!(p = strchr(str, '.'))) {
@@ -155,8 +155,8 @@ PHP_FUNCTION(bcadd)
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, Z_STRVAL_PP(left));
- php_str2num(&second, Z_STRVAL_PP(right));
+ php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
+ php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_add (first, second, &result, scale);
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
@@ -199,8 +199,8 @@ PHP_FUNCTION(bcsub)
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, Z_STRVAL_PP(left));
- php_str2num(&second, Z_STRVAL_PP(right));
+ php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
+ php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_sub (first, second, &result, scale);
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
@@ -243,8 +243,8 @@ PHP_FUNCTION(bcmul)
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, Z_STRVAL_PP(left));
- php_str2num(&second, Z_STRVAL_PP(right));
+ php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
+ php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_multiply (first, second, &result, scale TSRMLS_CC);
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
@@ -287,8 +287,8 @@ PHP_FUNCTION(bcdiv)
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, Z_STRVAL_PP(left));
- php_str2num(&second, Z_STRVAL_PP(right));
+ php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
+ php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
switch (bc_divide (first, second, &result, scale TSRMLS_CC)) {
case 0: /* OK */
result->n_scale = scale;
@@ -365,9 +365,9 @@ PHP_FUNCTION(bcpowmod)
bc_init_num(&second TSRMLS_CC);
bc_init_num(&mod TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, left);
- php_str2num(&second, right);
- php_str2num(&mod, modulous);
+ php_str2num(&first, left TSRMLS_CC);
+ php_str2num(&second, right TSRMLS_CC);
+ php_str2num(&mod, modulous TSRMLS_CC);
bc_raisemod(first, second, mod, &result, scale TSRMLS_CC);
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
@@ -411,8 +411,8 @@ PHP_FUNCTION(bcpow)
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&first, Z_STRVAL_PP(left));
- php_str2num(&second, Z_STRVAL_PP(right));
+ php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
+ php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_raise (first, second, &result, scale TSRMLS_CC);
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
@@ -452,7 +452,7 @@ PHP_FUNCTION(bcsqrt)
}
convert_to_string_ex(left);
bc_init_num(&result TSRMLS_CC);
- php_str2num(&result, Z_STRVAL_PP(left));
+ php_str2num(&result, Z_STRVAL_PP(left) TSRMLS_CC);
if (bc_sqrt (&result, scale TSRMLS_CC) != 0) {
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);