aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-03-27 09:07:54 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-04-15 18:25:38 +0000
commit33d05394a6f5e7923bc115faf5122b7f38b0418a (patch)
tree1b08b95cdaeaf073bbefc5d0043f64c735eb4e23
parent1a00282a739d5cb7247ac3634ddd3e76537ef5eb (diff)
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>
-rw-r--r--json-lexer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/json-lexer.c b/json-lexer.c
index c736f4290..65c9720d6 100644
--- a/json-lexer.c
+++ b/json-lexer.c
@@ -28,7 +28,7 @@
*/
enum json_lexer_state {
- ERROR = 0,
+ IN_ERROR = 0,
IN_DQ_UCODE3,
IN_DQ_UCODE2,
IN_DQ_UCODE1,
@@ -150,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,
},
@@ -302,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;