com php-src: rework fd521a22 to simplify for master, see github #2356: Zend/zend_exceptions.c
[email protected] (Anatol Belski)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 7e440f2209cab70b6e7bf93b8a93c258f9354426 Author: Anatol Belski <[email protected]> Tue, 7 Feb 2017 12:40:10 +0100 Parents: 623478a2d6304cb6ddf79826be2eb5aee9cd1aed Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7e440f2209cab70b6e7bf93b8a93c258f9354426 Log: rework fd521a22 to simplify for master, see github #2356 Bugs: https://bugs.php.net/2356 Changed paths: M Zend/zend_exceptions.c Diff: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index ea38f67..d9db617 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -520,12 +520,8 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */ smart_str_appends(str, ", "); break; case IS_DOUBLE: { - double dval = Z_DVAL_P(arg); - char *s_tmp; - size_t l_tmp = zend_spprintf(&s_tmp, MAX_LENGTH_OF_DOUBLE + EG(precision) + 1, "%.*G", (int) EG(precision), dval); /* SAFE */ - smart_str_appendl(str, s_tmp, l_tmp); + smart_str_append_printf(str, "%.*G", (int) EG(precision), Z_DVAL_P(arg)); smart_str_appends(str, ", "); - efree(s_tmp); break; } case IS_ARRAY: