diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-07 09:25:04 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-07 09:25:04 +0300 |
commit | a8a04658b070810226ef56b67b9cc35950f0c0c7 (patch) | |
tree | c4b7d764a3168bfddeece2100c9ed2704160d918 /ext | |
parent | c0b73c82afb8403e5792091b948295f4cee252ed (diff) | |
download | php-git-a8a04658b070810226ef56b67b9cc35950f0c0c7.tar.gz |
Fixed build (missing function borrowed from PHP-7.2)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bcmath/bcmath.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 250c751d7a..121d193514 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -208,6 +208,21 @@ static void php_str2num(bc_num *num, char *str) } /* }}} */ +/* {{{ split_bc_num + Convert to bc_num detecting scale */ +static bc_num split_bc_num(bc_num num) { + bc_num newnum; + if (num->n_refs >= 1) { + return num; + } + newnum = _bc_new_num_ex(0, 0, 0); + *newnum = *num; + newnum->n_refs = 1; + num->n_refs--; + return newnum; +} +/* }}} */ + /* {{{ proto string bcadd(string left_operand, string right_operand [, int scale]) Returns the sum of two arbitrary precision numbers */ PHP_FUNCTION(bcadd) |