Skip to content

Commit 75c5705

Browse files
committed
Rename typedef in jsonpath_scan.l from "keyword" to "JsonPathKeyword"
Typedef name should be both unique and non-intersect with variable names across all the sources. That makes both pg_indent and debuggers happy. Discussion: https://postgr.es/m/23865.1552936099%40sss.pgh.pa.us
1 parent 590a870 commit 75c5705

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/backend/utils/adt/jsonpath_scan.l

+9-9
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,20 @@ jsonpath_yyerror(JsonPathParseResult **result, const char *message)
282282
}
283283
}
284284

285-
typedef struct keyword
285+
typedef struct JsonPathKeyword
286286
{
287287
int16 len;
288288
bool lowercase;
289289
int val;
290-
const char *keyword;
291-
} keyword;
290+
const char *keyword;
291+
} JsonPathKeyword;
292292

293293
/*
294294
* Array of key words should be sorted by length and then
295295
* alphabetical order
296296
*/
297297

298-
static const keyword keywords[] = {
298+
static const JsonPathKeyword keywords[] = {
299299
{ 2, false, IS_P, "is"},
300300
{ 2, false, TO_P, "to"},
301301
{ 3, false, ABS_P, "abs"},
@@ -322,11 +322,11 @@ static const keyword keywords[] = {
322322
static int
323323
checkSpecialVal()
324324
{
325-
int res = IDENT_P;
326-
int diff;
327-
const keyword *StopLow = keywords,
328-
*StopHigh = keywords + lengthof(keywords),
329-
*StopMiddle;
325+
int res = IDENT_P;
326+
int diff;
327+
const JsonPathKeyword *StopLow = keywords,
328+
*StopHigh = keywords + lengthof(keywords),
329+
*StopMiddle;
330330

331331
if (scanstring.len > keywords[lengthof(keywords) - 1].len)
332332
return res;

0 commit comments

Comments
 (0)