summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-01-25 18:43:15 +0000
committerJakub Zelenka <bukka@php.net>2015-01-25 18:43:15 +0000
commit3159d518d0c60dcb796b34f86b21593c7a728897 (patch)
tree05cb0211c7607595299bce7463257c0af9e5786b /ext/json/json.c
parent3ddb5993ddcf0cb76a7f8900bfb2a6bcdc497302 (diff)
parentdf984ad4f5e4e53e3f8bdafc7d620fd8112a121c (diff)
downloadphp-git-3159d518d0c60dcb796b34f86b21593c7a728897.tar.gz
Merge branch 'master' into jsond
Conflicts: ext/json/JSON_parser.c ext/json/json.c
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 7db6136e87..b1de42a577 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,6 +32,14 @@
#include "php_json_parser.h"
#include <zend_exceptions.h>
+#include <float.h>
+#if defined(DBL_MANT_DIG) && defined(DBL_MIN_EXP)
+#define NUM_BUF_SIZE (3 + DBL_MANT_DIG - DBL_MIN_EXP)
+#else
+#define NUM_BUF_SIZE 1080
+#endif
+
+
static PHP_MINFO_FUNCTION(json);
static PHP_FUNCTION(json_encode);
static PHP_FUNCTION(json_decode);