diff --git a/upb/json/parser.c b/upb/json/parser.c index d2e38545bd..07132fa2c5 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 8e608e845d..e8f34fe9fb 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 fa7146966a..8896d7ba30 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; }