diff options
Diffstat (limited to 'ext/json/JSON_parser.h')
-rw-r--r-- | ext/json/JSON_parser.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/json/JSON_parser.h b/ext/json/JSON_parser.h index 9aab62a912..0ed7e52a8f 100644 --- a/ext/json/JSON_parser.h +++ b/ext/json/JSON_parser.h @@ -12,12 +12,20 @@ typedef struct JSON_parser_struct { int state; int depth; int top; - int error; + int error_code; int* stack; zval *the_zstack[JSON_PARSER_MAX_DEPTH]; } * JSON_parser; +enum error_codes { + PHP_JSON_ERROR_NONE = 0, + PHP_JSON_ERROR_DEPTH, + PHP_JSON_ERROR_STATE_MISMATCH, + PHP_JSON_ERROR_CTRL_CHAR, + PHP_JSON_ERROR_SYNTAX, +}; + extern JSON_parser new_JSON_parser(int depth); extern int parse_JSON(JSON_parser jp, zval *z, unsigned short utf16_json[], int length, int assoc TSRMLS_DC); extern int free_JSON_parser(JSON_parser jp); |