diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2016-08-17 14:15:09 +0200 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2016-08-17 14:15:09 +0200 |
commit | 27ceb6ffb5fdfdbfb4b77b6b6bd7366f8cecaa7d (patch) | |
tree | baeb0efb022765ff7167ebf775f182baea0de1f3 | |
parent | f7231acadfe79f5d42ffd26671451610ee1e1c07 (diff) | |
parent | 9b783107e550584b6e4b00d424d29c82b88a1286 (diff) | |
download | php-git-27ceb6ffb5fdfdbfb4b77b6b6bd7366f8cecaa7d.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fix build as done in master in commit 040331c36462eac94308bbef3200ee11389ca444
Fixed C89 build
-rw-r--r-- | ext/standard/array.c | 3 | ||||
-rw-r--r-- | ext/standard/php_math.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index cb78cad39c..848f109494 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -45,6 +45,7 @@ #include "basic_functions.h" #include "php_string.h" #include "php_rand.h" +#include "php_math.h" #include "zend_smart_str.h" #include "zend_bitset.h" #include "ext/spl/spl_array.h" @@ -2141,7 +2142,7 @@ PHP_FUNCTION(array_fill_keys) php_error_docref(NULL, E_WARNING, "The supplied range exceeds the maximum array size: start=%0.0f end=%0.0f", end, start); \ RETURN_FALSE; \ } \ - size = (uint32_t)round(__calc_size); \ + size = (uint32_t)_php_math_round(__calc_size, 0, PHP_ROUND_HALF_UP); \ array_init_size(return_value, size); \ zend_hash_real_init(Z_ARRVAL_P(return_value), 1); \ } while (0) diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h index bc5b5125ee..3ff0f04ae7 100644 --- a/ext/standard/php_math.h +++ b/ext/standard/php_math.h @@ -22,6 +22,7 @@ #ifndef PHP_MATH_H #define PHP_MATH_H +PHPAPI double _php_math_round(double, int, int); PHPAPI zend_string *_php_math_number_format(double, int, char, char); PHPAPI zend_string *_php_math_number_format_ex(double, int, char *, size_t, char *, size_t); PHPAPI zend_string * _php_math_longtobase(zval *arg, int base); |