# HG changeset patch # User Olaf Wintermann # Date 1729592268 -7200 # Node ID 8a5bbdb7f87f29bc022d427793a20fac450746d8 # Parent 9077724b75a0ec701c5465cef301bbe58279f009 use json reader state macros everywhere diff -r 9077724b75a0 -r 8a5bbdb7f87f src/json.c --- a/src/json.c Tue Oct 22 12:16:16 2024 +0200 +++ b/src/json.c Tue Oct 22 12:17:48 2024 +0200 @@ -510,9 +510,9 @@ // expect ':' if (token.tokentype != CX_JSON_TOKEN_NAME_SEPARATOR) return -1; // next state - p->states[p->nstates] = 1; + p->states[p->nstates] = JP_STATE_VALUE_BEGIN_OBJ; ret = json_read(p); - } else if (state == 7) { + } else if (state == JP_STATE_OBJ_SEP_OR_CLOSE) { // expect ',' or '}' if (token.tokentype == CX_JSON_TOKEN_VALUE_SEPARATOR) { p->states[p->nstates] = JP_STATE_OBJ_NAME;