diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2019-03-17 12:50:38 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2019-03-17 12:50:38 +0300 |
commit | aa1b7f386687dec17ffa62d13026580050734632 (patch) | |
tree | 510b6ba2cc9e37eefdd719776043b70463670d91 /src/backend/utils/adt | |
parent | c183a07f279d1fba8ccea1baf7210e8fafbaa097 (diff) | |
download | postgresql-aa1b7f386687dec17ffa62d13026580050734632.tar.gz postgresql-aa1b7f386687dec17ffa62d13026580050734632.zip |
Apply const qualifier to keywords of jsonpath_scan.l
Discussion: https://postgr.es/m/CAEeOP_a-Pfy%3DU9-f%3DgQ0AsB8FrxrC8xCTVq%2BeO71-2VoWP5cag%40mail.gmail.com
Author: Mark G
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r-- | src/backend/utils/adt/jsonpath_scan.l | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/utils/adt/jsonpath_scan.l b/src/backend/utils/adt/jsonpath_scan.l index 110ea2160d9..06efe0e6ab9 100644 --- a/src/backend/utils/adt/jsonpath_scan.l +++ b/src/backend/utils/adt/jsonpath_scan.l @@ -284,10 +284,10 @@ jsonpath_yyerror(JsonPathParseResult **result, const char *message) typedef struct keyword { - int16 len; - bool lowercase; - int val; - char *keyword; + int16 len; + bool lowercase; + int val; + const char *keyword; } keyword; /* @@ -295,7 +295,7 @@ typedef struct keyword * alphabetical order */ -static keyword keywords[] = { +static const keyword keywords[] = { { 2, false, IS_P, "is"}, { 2, false, TO_P, "to"}, { 3, false, ABS_P, "abs"}, @@ -322,11 +322,11 @@ static keyword keywords[] = { static int checkSpecialVal() { - int res = IDENT_P; - int diff; - keyword *StopLow = keywords, - *StopHigh = keywords + lengthof(keywords), - *StopMiddle; + int res = IDENT_P; + int diff; + const keyword *StopLow = keywords, + *StopHigh = keywords + lengthof(keywords), + *StopMiddle; if (scanstring.len > keywords[lengthof(keywords) - 1].len) return res; |