@@ -2105,7 +2105,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
2105
2105
* A helper for error messages that should print the current token. The
2106
2106
* format must contain exactly one %.*s specifier.
2107
2107
*/
2108
- #define token_error (lex , format ) \
2108
+ #define json_token_error (lex , format ) \
2109
2109
appendStringInfo((lex)->errormsg, _(format), \
2110
2110
(int) ((lex)->token_terminator - (lex)->token_start), \
2111
2111
(lex)->token_start);
@@ -2124,41 +2124,41 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
2124
2124
case JSON_NESTING_TOO_DEEP :
2125
2125
return (_ ("JSON nested too deep, maximum permitted depth is 6400" ));
2126
2126
case JSON_ESCAPING_INVALID :
2127
- token_error (lex , "Escape sequence \"\\%.*s\" is invalid." );
2127
+ json_token_error (lex , "Escape sequence \"\\%.*s\" is invalid." );
2128
2128
break ;
2129
2129
case JSON_ESCAPING_REQUIRED :
2130
2130
appendStringInfo (lex -> errormsg ,
2131
2131
_ ("Character with value 0x%02x must be escaped." ),
2132
2132
(unsigned char ) * (lex -> token_terminator ));
2133
2133
break ;
2134
2134
case JSON_EXPECTED_END :
2135
- token_error (lex , "Expected end of input, but found \"%.*s\"." );
2135
+ json_token_error (lex , "Expected end of input, but found \"%.*s\"." );
2136
2136
break ;
2137
2137
case JSON_EXPECTED_ARRAY_FIRST :
2138
- token_error (lex , "Expected array element or \"]\", but found \"%.*s\"." );
2138
+ json_token_error (lex , "Expected array element or \"]\", but found \"%.*s\"." );
2139
2139
break ;
2140
2140
case JSON_EXPECTED_ARRAY_NEXT :
2141
- token_error (lex , "Expected \",\" or \"]\", but found \"%.*s\"." );
2141
+ json_token_error (lex , "Expected \",\" or \"]\", but found \"%.*s\"." );
2142
2142
break ;
2143
2143
case JSON_EXPECTED_COLON :
2144
- token_error (lex , "Expected \":\", but found \"%.*s\"." );
2144
+ json_token_error (lex , "Expected \":\", but found \"%.*s\"." );
2145
2145
break ;
2146
2146
case JSON_EXPECTED_JSON :
2147
- token_error (lex , "Expected JSON value, but found \"%.*s\"." );
2147
+ json_token_error (lex , "Expected JSON value, but found \"%.*s\"." );
2148
2148
break ;
2149
2149
case JSON_EXPECTED_MORE :
2150
2150
return _ ("The input string ended unexpectedly." );
2151
2151
case JSON_EXPECTED_OBJECT_FIRST :
2152
- token_error (lex , "Expected string or \"}\", but found \"%.*s\"." );
2152
+ json_token_error (lex , "Expected string or \"}\", but found \"%.*s\"." );
2153
2153
break ;
2154
2154
case JSON_EXPECTED_OBJECT_NEXT :
2155
- token_error (lex , "Expected \",\" or \"}\", but found \"%.*s\"." );
2155
+ json_token_error (lex , "Expected \",\" or \"}\", but found \"%.*s\"." );
2156
2156
break ;
2157
2157
case JSON_EXPECTED_STRING :
2158
- token_error (lex , "Expected string, but found \"%.*s\"." );
2158
+ json_token_error (lex , "Expected string, but found \"%.*s\"." );
2159
2159
break ;
2160
2160
case JSON_INVALID_TOKEN :
2161
- token_error (lex , "Token \"%.*s\" is invalid." );
2161
+ json_token_error (lex , "Token \"%.*s\" is invalid." );
2162
2162
break ;
2163
2163
case JSON_UNICODE_CODE_POINT_ZERO :
2164
2164
return _ ("\\u0000 cannot be converted to text." );
@@ -2189,7 +2189,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
2189
2189
/* fall through to the error code after switch */
2190
2190
break ;
2191
2191
}
2192
- #undef token_error
2192
+ #undef json_token_error
2193
2193
2194
2194
/*
2195
2195
* We don't use a default: case, so that the compiler will warn about
0 commit comments