From: Alexander Korotkov Date: Tue, 19 Mar 2019 17:56:13 +0000 (+0300) Subject: Rename typedef in jsonpath_gram.y from "string" to "JsonPathString" X-Git-Tag: REL_12_BETA1~489 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e28b778bf9a5835e702277119c5f92b4dbab45e;p=postgresql Rename typedef in jsonpath_gram.y from "string" to "JsonPathString" Reason is the same as in 75c57058b0. --- diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y index 2486fcd9e4..66b8c279ee 100644 --- a/src/backend/utils/adt/jsonpath_gram.y +++ b/src/backend/utils/adt/jsonpath_gram.y @@ -48,7 +48,7 @@ makeItemType(int type) } static JsonPathParseItem* -makeItemString(string *s) +makeItemString(JsonPathString *s) { JsonPathParseItem *v; @@ -67,7 +67,7 @@ makeItemString(string *s) } static JsonPathParseItem* -makeItemVariable(string *s) +makeItemVariable(JsonPathString *s) { JsonPathParseItem *v; @@ -79,7 +79,7 @@ makeItemVariable(string *s) } static JsonPathParseItem* -makeItemKey(string *s) +makeItemKey(JsonPathString *s) { JsonPathParseItem *v; @@ -90,7 +90,7 @@ makeItemKey(string *s) } static JsonPathParseItem* -makeItemNumeric(string *s) +makeItemNumeric(JsonPathString *s) { JsonPathParseItem *v; @@ -210,7 +210,8 @@ makeAny(int first, int last) } static JsonPathParseItem * -makeItemLikeRegex(JsonPathParseItem *expr, string *pattern, string *flags) +makeItemLikeRegex(JsonPathParseItem *expr, JsonPathString *pattern, + JsonPathString *flags) { JsonPathParseItem *v = makeItemType(jpiLikeRegex); int i; @@ -267,7 +268,7 @@ makeItemLikeRegex(JsonPathParseItem *expr, string *pattern, string *flags) %parse-param {JsonPathParseResult **result} %union { - string str; + JsonPathString str; List *elems; /* list of JsonPathParseItem */ List *indexs; /* list of integers */ JsonPathParseItem *value; diff --git a/src/backend/utils/adt/jsonpath_scan.l b/src/backend/utils/adt/jsonpath_scan.l index eca34411c9..e7aa1feb75 100644 --- a/src/backend/utils/adt/jsonpath_scan.l +++ b/src/backend/utils/adt/jsonpath_scan.l @@ -18,7 +18,7 @@ #include "nodes/pg_list.h" #include "utils/jsonpath_scanner.h" -static string scanstring; +static JsonPathString scanstring; /* No reason to constrain amount of data slurped */ /* #define YY_READ_BUF_SIZE 16777216 */ diff --git a/src/include/utils/jsonpath_scanner.h b/src/include/utils/jsonpath_scanner.h index bbdd984dab..1c567717e8 100644 --- a/src/include/utils/jsonpath_scanner.h +++ b/src/include/utils/jsonpath_scanner.h @@ -13,13 +13,13 @@ #ifndef JSONPATH_SCANNER_H #define JSONPATH_SCANNER_H -/* struct string is shared between scan and gram */ -typedef struct string +/* struct JsonPathString is shared between scan and gram */ +typedef struct JsonPathString { char *val; int len; int total; -} string; +} JsonPathString; #include "utils/jsonpath.h" #include "utils/jsonpath_gram.h"