Skip to content

Commit

Permalink
[yugabyte#5408] [YSQL] Rename typedef in jsonpath_scan.l from "keywor…
Browse files Browse the repository at this point in the history
…d" to "JsonPathKeyword"

Summary:
Original commit was 75c57058b0f5d511a9d80ddfab68a761229d68ea

Original commit message:

    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

Test Plan: Build yugabyte DB and run test suite

Reviewers: mihnea, jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D9364
  • Loading branch information
tedyu committed Sep 14, 2020
1 parent a9e07c6 commit 63c901d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/postgres/src/backend/utils/adt/jsonpath_scan.l
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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;
Expand Down

0 comments on commit 63c901d

Please sign in to comment.