Skip to content

Commit 5e28b77

Browse files
committed
Rename typedef in jsonpath_gram.y from "string" to "JsonPathString"
Reason is the same as in 75c5705.
1 parent 1009920 commit 5e28b77

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/backend/utils/adt/jsonpath_gram.y

+7-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ makeItemType(int type)
4848
}
4949

5050
static JsonPathParseItem*
51-
makeItemString(string *s)
51+
makeItemString(JsonPathString *s)
5252
{
5353
JsonPathParseItem *v;
5454

@@ -67,7 +67,7 @@ makeItemString(string *s)
6767
}
6868

6969
static JsonPathParseItem*
70-
makeItemVariable(string *s)
70+
makeItemVariable(JsonPathString *s)
7171
{
7272
JsonPathParseItem *v;
7373

@@ -79,7 +79,7 @@ makeItemVariable(string *s)
7979
}
8080

8181
static JsonPathParseItem*
82-
makeItemKey(string *s)
82+
makeItemKey(JsonPathString *s)
8383
{
8484
JsonPathParseItem *v;
8585

@@ -90,7 +90,7 @@ makeItemKey(string *s)
9090
}
9191

9292
static JsonPathParseItem*
93-
makeItemNumeric(string *s)
93+
makeItemNumeric(JsonPathString *s)
9494
{
9595
JsonPathParseItem *v;
9696

@@ -210,7 +210,8 @@ makeAny(int first, int last)
210210
}
211211

212212
static JsonPathParseItem *
213-
makeItemLikeRegex(JsonPathParseItem *expr, string *pattern, string *flags)
213+
makeItemLikeRegex(JsonPathParseItem *expr, JsonPathString *pattern,
214+
JsonPathString *flags)
214215
{
215216
JsonPathParseItem *v = makeItemType(jpiLikeRegex);
216217
int i;
@@ -267,7 +268,7 @@ makeItemLikeRegex(JsonPathParseItem *expr, string *pattern, string *flags)
267268
%parse-param {JsonPathParseResult **result}
268269

269270
%union {
270-
string str;
271+
JsonPathString str;
271272
List *elems; /* list of JsonPathParseItem */
272273
List *indexs; /* list of integers */
273274
JsonPathParseItem *value;

src/backend/utils/adt/jsonpath_scan.l

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "nodes/pg_list.h"
1919
#include "utils/jsonpath_scanner.h"
2020

21-
static string scanstring;
21+
static JsonPathString scanstring;
2222

2323
/* No reason to constrain amount of data slurped */
2424
/* #define YY_READ_BUF_SIZE 16777216 */

src/include/utils/jsonpath_scanner.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#ifndef JSONPATH_SCANNER_H
1414
#define JSONPATH_SCANNER_H
1515

16-
/* struct string is shared between scan and gram */
17-
typedef struct string
16+
/* struct JsonPathString is shared between scan and gram */
17+
typedef struct JsonPathString
1818
{
1919
char *val;
2020
int len;
2121
int total;
22-
} string;
22+
} JsonPathString;
2323

2424
#include "utils/jsonpath.h"
2525
#include "utils/jsonpath_gram.h"

0 commit comments

Comments
 (0)