Rename typedef in jsonpath_scan.l from "keyword" to "JsonPathKeyword"
authorAlexander Korotkov <[email protected]>
Tue, 19 Mar 2019 10:34:16 +0000 (13:34 +0300)
committerAlexander Korotkov <[email protected]>
Tue, 19 Mar 2019 10:40:55 +0000 (13:40 +0300)
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

src/backend/utils/adt/jsonpath_scan.l

index c320816960199894ed8ad1f0c42a66e44c4d4dd7..eca34411c90cad987755ef5af6f9980ebe004c9b 100644 (file)
@@ -282,20 +282,20 @@ jsonpath_yyerror(JsonPathParseResult **result, const char *message)
    }
 }
 
-typedef struct keyword
+typedef struct JsonPathKeyword
 {
    int16       len;
    bool        lowercase;
    int         val;
-   const char  *keyword;
-} keyword;
+   const char *keyword;
+} JsonPathKeyword;
 
 /*
  * Array of key words should be sorted by length and then
  * alphabetical order
  */
 
-static const keyword keywords[] = {
+static const JsonPathKeyword keywords[] = {
    { 2, false, IS_P,       "is"},
    { 2, false, TO_P,       "to"},
    { 3, false, ABS_P,      "abs"},
@@ -322,11 +322,11 @@ static const keyword keywords[] = {
 static int
 checkSpecialVal()
 {
-   int             res = IDENT_P;
-   int             diff;
-   const keyword  *StopLow = keywords,
-                  *StopHigh = keywords + lengthof(keywords),
-                  *StopMiddle;
+   int                     res = IDENT_P;
+   int                     diff;
+   const JsonPathKeyword  *StopLow = keywords,
+                          *StopHigh = keywords + lengthof(keywords),
+                          *StopMiddle;
 
    if (scanstring.len > keywords[lengthof(keywords) - 1].len)
        return res;