json-lexer: fix conflict with mingw32 ERROR definition

The name ERROR is too generic, it conflicts with mingw32 ERROR definition.

Replace ERROR with IN_ERROR.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-03-27 09:07:54 +00:00
parent 1a00282a73
commit 33d05394a6

View File

@ -28,7 +28,7 @@
*/ */
enum json_lexer_state { enum json_lexer_state {
ERROR = 0, IN_ERROR = 0,
IN_DQ_UCODE3, IN_DQ_UCODE3,
IN_DQ_UCODE2, IN_DQ_UCODE2,
IN_DQ_UCODE1, IN_DQ_UCODE1,
@ -150,7 +150,7 @@ static const uint8_t json_lexer[][256] = {
/* Zero */ /* Zero */
[IN_ZERO] = { [IN_ZERO] = {
TERMINAL(JSON_INTEGER), TERMINAL(JSON_INTEGER),
['0' ... '9'] = ERROR, ['0' ... '9'] = IN_ERROR,
['.'] = IN_MANTISSA, ['.'] = IN_MANTISSA,
}, },
@ -302,7 +302,7 @@ static int json_lexer_feed_char(JSONLexer *lexer, char ch)
lexer->token = qstring_new(); lexer->token = qstring_new();
new_state = IN_START; new_state = IN_START;
break; break;
case ERROR: case IN_ERROR:
return -EINVAL; return -EINVAL;
default: default:
break; break;