diff options
author | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
commit | c3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch) | |
tree | d82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/bcmath | |
parent | 0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff) | |
download | php-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz |
master renames phase 1
Diffstat (limited to 'ext/bcmath')
-rw-r--r-- | ext/bcmath/bcmath.c | 38 | ||||
-rw-r--r-- | ext/bcmath/libbcmath/src/num2str.c | 4 | ||||
-rw-r--r-- | ext/bcmath/php_bcmath.h | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index b45a738a04..a6775c8c84 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -206,12 +206,12 @@ static void php_str2num(bc_num *num, char *str TSRMLS_DC) PHP_FUNCTION(bcadd) { char *left, *right; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second, result; int left_len, right_len; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -244,11 +244,11 @@ PHP_FUNCTION(bcsub) { char *left, *right; int left_len, right_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second, result; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -281,11 +281,11 @@ PHP_FUNCTION(bcmul) { char *left, *right; int left_len, right_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second, result; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -318,11 +318,11 @@ PHP_FUNCTION(bcdiv) { char *left, *right; int left_len, right_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second, result; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -396,10 +396,10 @@ PHP_FUNCTION(bcpowmod) char *left, *right, *modulous; int left_len, right_len, modulous_len; bc_num first, second, mod, result; - php_int_t scale = BCG(bc_precision); + zend_long scale = BCG(bc_precision); int scale_int; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|i", &left, &left_len, &right, &right_len, &modulous, &modulous_len, &scale) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|l", &left, &left_len, &right, &right_len, &modulous, &modulous_len, &scale) == FAILURE) { return; } @@ -436,11 +436,11 @@ PHP_FUNCTION(bcpow) { char *left, *right; int left_len, right_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second, result; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -473,11 +473,11 @@ PHP_FUNCTION(bcsqrt) { char *left; int left_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num result; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "s|i", &left, &left_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "s|l", &left, &left_len, &scale_param) == FAILURE) { return; } @@ -508,11 +508,11 @@ PHP_FUNCTION(bccomp) { char *left, *right; int left_len, right_len; - php_int_t scale_param = 0; + zend_long scale_param = 0; bc_num first, second; int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, "ss|i", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) { return; } @@ -525,7 +525,7 @@ PHP_FUNCTION(bccomp) bc_str2num(&first, left, scale TSRMLS_CC); bc_str2num(&second, right, scale TSRMLS_CC); - RETVAL_INT(bc_compare(first, second)); + RETVAL_LONG(bc_compare(first, second)); bc_free_num(&first); bc_free_num(&second); @@ -537,9 +537,9 @@ PHP_FUNCTION(bccomp) Sets default scale parameter for all bc math functions */ PHP_FUNCTION(bcscale) { - php_int_t new_scale; + zend_long new_scale; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &new_scale) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &new_scale) == FAILURE) { return; } diff --git a/ext/bcmath/libbcmath/src/num2str.c b/ext/bcmath/libbcmath/src/num2str.c index 47990d2e92..e38bf87797 100644 --- a/ext/bcmath/libbcmath/src/num2str.c +++ b/ext/bcmath/libbcmath/src/num2str.c @@ -52,9 +52,9 @@ zend_string /* Allocate the string memory. */ signch = ( num->n_sign == PLUS ? 0 : 1 ); /* Number of sign chars. */ if (num->n_scale > 0) - str = STR_ALLOC(num->n_len + num->n_scale + signch + 1, 0); + str = zend_string_alloc(num->n_len + num->n_scale + signch + 1, 0); else - str = STR_ALLOC(num->n_len + signch, 0); + str = zend_string_alloc(num->n_len + signch, 0); if (str == NULL) bc_out_of_memory(); /* The negative sign if needed. */ diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h index 96f0baf189..df16410004 100644 --- a/ext/bcmath/php_bcmath.h +++ b/ext/bcmath/php_bcmath.h @@ -45,7 +45,7 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath) bc_num _zero_; bc_num _one_; bc_num _two_; - php_int_t bc_precision; + zend_long bc_precision; ZEND_END_MODULE_GLOBALS(bcmath) #ifdef ZTS |