com php-src: Increase PHP_JSON_DOUBLE_MAX_LENGTH for fractional part: ext/json/json_encoder.c

From: Date: Sun, 18 Jan 2015 16:31:24 +0000
Subject: com php-src: Increase PHP_JSON_DOUBLE_MAX_LENGTH for fractional part: ext/json/json_encoder.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84709@lists.php.net to get a copy of this message
Commit: 3ddb5993ddcf0cb76a7f8900bfb2a6bcdc497302 Author: Jakub Zelenka <bukka@php.net> Sun, 18 Jan 2015 16:31:24 +0000 Parents: 91386cb2879782c574d1f67b4c472f1f9b40d839 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3ddb5993ddcf0cb76a7f8900bfb2a6bcdc497302 Log: Increase PHP_JSON_DOUBLE_MAX_LENGTH for fractional part This is probably not necessary as such number is not realistic. It's just to be consistent with jsond extension. Changed paths: M ext/json/json_encoder.c Diff: diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index 510163d..5eb9f45 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -33,9 +33,9 @@ /* double limits */ #include <float.h> #if defined(DBL_MANT_DIG) && defined(DBL_MIN_EXP) -#define PHP_JSON_DOUBLE_MAX_LENGTH (1 + DBL_MANT_DIG - DBL_MIN_EXP) +#define PHP_JSON_DOUBLE_MAX_LENGTH (3 + DBL_MANT_DIG - DBL_MIN_EXP) #else -#define PHP_JSON_DOUBLE_MAX_LENGTH 1078 +#define PHP_JSON_DOUBLE_MAX_LENGTH 1080 #endif ZEND_DECLARE_MODULE_GLOBALS(json)

« previous php.cvs (#84709) next »