summaryrefslogtreecommitdiff
path: root/ext/json/JSON_parser.h
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2009-05-14 22:02:08 +0000
committerScott MacVicar <scottmac@php.net>2009-05-14 22:02:08 +0000
commitd2a7785878c37fc7b4eac25b5649cade5b745f01 (patch)
tree69dbd3c1f8ec8cb6f4fbff13301ca30aea0a2f16 /ext/json/JSON_parser.h
parentc0ce0e793289b4657380412c39314546b463956b (diff)
downloadphp-git-d2a7785878c37fc7b4eac25b5649cade5b745f01.tar.gz
MFH Allow a custom recursion depth to be specified for json_decode()
Diffstat (limited to 'ext/json/JSON_parser.h')
-rw-r--r--ext/json/JSON_parser.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/json/JSON_parser.h b/ext/json/JSON_parser.h
index 0ed7e52a8f..771ba967ac 100644
--- a/ext/json/JSON_parser.h
+++ b/ext/json/JSON_parser.h
@@ -6,7 +6,7 @@
#include "php.h"
#include "ext/standard/php_smart_str.h"
-#define JSON_PARSER_MAX_DEPTH 512
+#define JSON_PARSER_DEFAULT_DEPTH 512
typedef struct JSON_parser_struct {
int state;
@@ -14,8 +14,8 @@ typedef struct JSON_parser_struct {
int top;
int error_code;
int* stack;
- zval *the_zstack[JSON_PARSER_MAX_DEPTH];
-
+ zval **the_zstack;
+ zval *the_static_zstack[JSON_PARSER_DEFAULT_DEPTH];
} * JSON_parser;
enum error_codes {