aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-12-26 11:11:14 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-12-26 11:11:14 +0100
commit3f2d72b4934945da76f6bc60dfe3fc5ca42e7526 (patch)
treecc484b93acf14c9d5717fae21e7d1bcb5a618809
parenta86cfcae7c58049c7a3a60118ef3f53afd92b3fa (diff)
downloadpostgresql-3f2d72b4934945da76f6bc60dfe3fc5ca42e7526.tar.gz
postgresql-3f2d72b4934945da76f6bc60dfe3fc5ca42e7526.zip
plpgsql: Rename a variable for clarity
Rename "core_yy_extra_type core_yy" to "core_yy_extra". The previous name was a bit unclear and confusing. The new name matches the name used elsewhere for the same purpose, for example in src/backend/parser/gramparse.h.
-rw-r--r--src/pl/plpgsql/src/pl_scanner.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pl/plpgsql/src/pl_scanner.c b/src/pl/plpgsql/src/pl_scanner.c
index 9407da51efa..45fb5265851 100644
--- a/src/pl/plpgsql/src/pl_scanner.c
+++ b/src/pl/plpgsql/src/pl_scanner.c
@@ -104,7 +104,7 @@ typedef struct
/* The stuff the core lexer needs */
static core_yyscan_t yyscanner = NULL;
-static core_yy_extra_type core_yy;
+static core_yy_extra_type core_yy_extra;
/* The original input string */
static const char *scanorig;
@@ -224,7 +224,7 @@ plpgsql_yylex(void)
push_back_token(tok3, &aux3);
push_back_token(tok2, &aux2);
if (plpgsql_parse_word(aux1.lval.str,
- core_yy.scanbuf + aux1.lloc,
+ core_yy_extra.scanbuf + aux1.lloc,
true,
&aux1.lval.wdatum,
&aux1.lval.word))
@@ -264,7 +264,7 @@ plpgsql_yylex(void)
* non-variable cases.
*/
if (plpgsql_parse_word(aux1.lval.str,
- core_yy.scanbuf + aux1.lloc,
+ core_yy_extra.scanbuf + aux1.lloc,
(!AT_STMT_START(plpgsql_yytoken) ||
(tok2 == '=' || tok2 == COLON_EQUALS ||
tok2 == '[')),
@@ -340,7 +340,7 @@ internal_yylex(TokenAuxData *auxdata)
yyscanner);
/* remember the length of yytext before it gets changed */
- yytext = core_yy.scanbuf + auxdata->lloc;
+ yytext = core_yy_extra.scanbuf + auxdata->lloc;
auxdata->leng = strlen(yytext);
/* Check for << >> and #, which the core considers operators */
@@ -515,7 +515,7 @@ plpgsql_scanner_errposition(int location)
void
plpgsql_yyerror(const char *message)
{
- char *yytext = core_yy.scanbuf + plpgsql_yylloc;
+ char *yytext = core_yy_extra.scanbuf + plpgsql_yylloc;
if (*yytext == '\0')
{
@@ -603,7 +603,7 @@ void
plpgsql_scanner_init(const char *str)
{
/* Start up the core scanner */
- yyscanner = scanner_init(str, &core_yy,
+ yyscanner = scanner_init(str, &core_yy_extra,
&ReservedPLKeywords, ReservedPLKeywordTokens);
/*