From 334bab5d8deb3b78cf1320eac180a145277aab86 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Wed, 15 Jul 2015 10:20:37 -0700 Subject: Updated JSON parser size. --- upb/json/parser.c | 4 ++-- upb/json/parser.h | 2 +- upb/json/parser.rl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/upb/json/parser.c b/upb/json/parser.c index d2e3854..07132fa 100644 --- a/upb/json/parser.c +++ b/upb/json/parser.c @@ -1575,8 +1575,8 @@ upb_json_parser *upb_json_parser_create(upb_env *env, upb_sink *output) { upb_sink_reset(&p->top->sink, output->handlers, output->closure); 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); */ + /* If this fails, uncomment and increase the value in parser.h. */ + 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.h b/upb/json/parser.h index 8e608e8..e8f34fe 100644 --- a/upb/json/parser.h +++ b/upb/json/parser.h @@ -27,7 +27,7 @@ UPB_DECLARE_TYPE(upb::json::Parser, upb_json_parser) * constructed. This hint may be an overestimate for some build configurations. * But if the parser library is upgraded without recompiling the application, * it may be an underestimate. */ -#define UPB_JSON_PARSER_SIZE 3568 +#define UPB_JSON_PARSER_SIZE 3704 #ifdef __cplusplus diff --git a/upb/json/parser.rl b/upb/json/parser.rl index fa71469..8896d7b 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -1310,8 +1310,8 @@ upb_json_parser *upb_json_parser_create(upb_env *env, upb_sink *output) { upb_sink_reset(&p->top->sink, output->handlers, output->closure); 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); */ + /* If this fails, uncomment and increase the value in parser.h. */ + /* fprintf(stderr, "%zd\n", upb_env_bytesallocated(env) - size_before); */ assert(upb_env_bytesallocated(env) - size_before <= UPB_JSON_PARSER_SIZE); return p; } -- cgit v1.2.3