constify-jsonpath-keywords.patch
text/x-patch
Filename: constify-jsonpath-keywords.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/utils/adt/jsonpath_scan.l | 3 | 3 |
diff --git a/src/backend/utils/adt/jsonpath_scan.l b/src/backend/utils/adt/jsonpath_scan.l
index 110ea21..5019b57 100644
--- a/src/backend/utils/adt/jsonpath_scan.l
+++ b/src/backend/utils/adt/jsonpath_scan.l
@@ -287,7 +287,7 @@ typedef struct keyword
int16 len;
bool lowercase;
int val;
- char *keyword;
+ 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"},
@@ -324,7 +324,7 @@ checkSpecialVal()
{
int res = IDENT_P;
int diff;
- keyword *StopLow = keywords,
+ const keyword *StopLow = keywords,
*StopHigh = keywords + lengthof(keywords),
*StopMiddle;