diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-07-15 10:39:32 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-07-15 10:39:32 -0700 |
commit | 2efe6be99415deb781955590edfc2541131be4bb (patch) | |
tree | 208e1924f8738987e0c9cfafe8df611e0897028c /upb/json | |
parent | 334bab5d8deb3b78cf1320eac180a145277aab86 (diff) |
Clear JSON parser status in reset.
Diffstat (limited to 'upb/json')
-rw-r--r-- | upb/json/parser.c | 3 | ||||
-rw-r--r-- | upb/json/parser.rl | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/upb/json/parser.c b/upb/json/parser.c index 07132fa..f9771f9 100644 --- a/upb/json/parser.c +++ b/upb/json/parser.c @@ -1550,6 +1550,7 @@ static void json_parser_reset(upb_json_parser *p) { p->multipart_state = MULTIPART_INACTIVE; p->capture = NULL; p->accumulated = NULL; + upb_status_clear(&p->status); } @@ -1576,7 +1577,7 @@ upb_json_parser *upb_json_parser_create(upb_env *env, upb_sink *output) { p->top->m = upb_handlers_msgdef(output->handlers); /* If this fails, uncomment and increase the value in parser.h. */ - fprintf(stderr, "%zd\n", upb_env_bytesallocated(env) - size_before); + /* fprintf(stderr, "%zd\n", upb_env_bytesallocated(env) - size_before); */ assert(upb_env_bytesallocated(env) - size_before <= UPB_JSON_PARSER_SIZE); return p; } diff --git a/upb/json/parser.rl b/upb/json/parser.rl index 8896d7b..40b7724 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -1285,6 +1285,7 @@ static void json_parser_reset(upb_json_parser *p) { p->multipart_state = MULTIPART_INACTIVE; p->capture = NULL; p->accumulated = NULL; + upb_status_clear(&p->status); } |