Content-Length: 308867 | pFad | http://github.com/postgrespro/postgres/commit/aa1b7f386687dec17ffa62d13026580050734632

40 Apply const qualifier to keywords of jsonpath_scan.l · postgrespro/postgres@aa1b7f3 · GitHub
Skip to content

Commit aa1b7f3

Browse files
committed
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
1 parent c183a07 commit aa1b7f3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/backend/utils/adt/jsonpath_scan.l

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,18 +284,18 @@ jsonpath_yyerror(JsonPathParseResult **result, const char *message)
284284

285285
typedef struct keyword
286286
{
287-
int16 len;
288-
bool lowercase;
289-
int val;
290-
char *keyword;
287+
int16 len;
288+
bool lowercase;
289+
int val;
290+
const char *keyword;
291291
} keyword;
292292

293293
/*
294294
* Array of key words should be sorted by length and then
295295
* alphabetical order
296296
*/
297297

298-
static keyword keywords[] = {
298+
static const keyword keywords[] = {
299299
{ 2, false, IS_P, "is"},
300300
{ 2, false, TO_P, "to"},
301301
{ 3, false, ABS_P, "abs"},
@@ -322,11 +322,11 @@ static keyword keywords[] = {
322322
static int
323323
checkSpecialVal()
324324
{
325-
int res = IDENT_P;
326-
int diff;
327-
keyword *StopLow = keywords,
328-
*StopHigh = keywords + lengthof(keywords),
329-
*StopMiddle;
325+
int res = IDENT_P;
326+
int diff;
327+
const keyword *StopLow = keywords,
328+
*StopHigh = keywords + lengthof(keywords),
329+
*StopMiddle;
330330

331331
if (scanstring.len > keywords[lengthof(keywords) - 1].len)
332332
return res;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/aa1b7f386687dec17ffa62d13026580050734632

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy