mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
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
This commit is contained in:
parent
590a87025b
commit
75c57058b0
@ -282,20 +282,20 @@ jsonpath_yyerror(JsonPathParseResult **result, const char *message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct keyword
|
typedef struct JsonPathKeyword
|
||||||
{
|
{
|
||||||
int16 len;
|
int16 len;
|
||||||
bool lowercase;
|
bool lowercase;
|
||||||
int val;
|
int val;
|
||||||
const char *keyword;
|
const char *keyword;
|
||||||
} keyword;
|
} JsonPathKeyword;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Array of key words should be sorted by length and then
|
* Array of key words should be sorted by length and then
|
||||||
* alphabetical order
|
* alphabetical order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const keyword keywords[] = {
|
static const JsonPathKeyword keywords[] = {
|
||||||
{ 2, false, IS_P, "is"},
|
{ 2, false, IS_P, "is"},
|
||||||
{ 2, false, TO_P, "to"},
|
{ 2, false, TO_P, "to"},
|
||||||
{ 3, false, ABS_P, "abs"},
|
{ 3, false, ABS_P, "abs"},
|
||||||
@ -322,11 +322,11 @@ static const keyword keywords[] = {
|
|||||||
static int
|
static int
|
||||||
checkSpecialVal()
|
checkSpecialVal()
|
||||||
{
|
{
|
||||||
int res = IDENT_P;
|
int res = IDENT_P;
|
||||||
int diff;
|
int diff;
|
||||||
const keyword *StopLow = keywords,
|
const JsonPathKeyword *StopLow = keywords,
|
||||||
*StopHigh = keywords + lengthof(keywords),
|
*StopHigh = keywords + lengthof(keywords),
|
||||||
*StopMiddle;
|
*StopMiddle;
|
||||||
|
|
||||||
if (scanstring.len > keywords[lengthof(keywords) - 1].len)
|
if (scanstring.len > keywords[lengthof(keywords) - 1].len)
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user