diff options
author | David 'Digit' Turner <digit@android.com> | 2011-05-10 12:58:58 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-06-01 17:08:17 +0200 |
commit | 9bfb3d508627076720224208c299c05c25e63792 (patch) | |
tree | a2fe375c8bfac20ad53ae649210d1c59db40e693 /json-lexer.c | |
parent | 6eaacfbad243e6f219667d938b06d68f99981301 (diff) | |
download | external_qemu-9bfb3d508627076720224208c299c05c25e63792.zip external_qemu-9bfb3d508627076720224208c299c05c25e63792.tar.gz external_qemu-9bfb3d508627076720224208c299c05c25e63792.tar.bz2 |
json-lexer.c, json-parser.c: minor integrate
Change-Id: Id7a703f5c93c9a9cbd47a5f44bfdf900080e7430
Diffstat (limited to 'json-lexer.c')
-rw-r--r-- | json-lexer.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/json-lexer.c b/json-lexer.c index 534fcf7..65c9720 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -27,12 +27,8 @@ * */ -/* Building with mingw results in an error because ERROR is defined as a - * macro in this environment. Undefined it */ -#undef ERROR - enum json_lexer_state { - ERROR = 0, + IN_ERROR = 0, IN_DQ_UCODE3, IN_DQ_UCODE2, IN_DQ_UCODE1, @@ -154,7 +150,7 @@ static const uint8_t json_lexer[][256] = { /* Zero */ [IN_ZERO] = { TERMINAL(JSON_INTEGER), - ['0' ... '9'] = ERROR, + ['0' ... '9'] = IN_ERROR, ['.'] = IN_MANTISSA, }, @@ -306,7 +302,7 @@ static int json_lexer_feed_char(JSONLexer *lexer, char ch) lexer->token = qstring_new(); new_state = IN_START; break; - case ERROR: + case IN_ERROR: return -EINVAL; default: break; |