Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3f2d72b

Browse files
committed
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.
1 parent a86cfca commit 3f2d72b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pl/plpgsql/src/pl_scanner.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ typedef struct
104104

105105
/* The stuff the core lexer needs */
106106
static core_yyscan_t yyscanner = NULL;
107-
static core_yy_extra_type core_yy;
107+
static core_yy_extra_type core_yy_extra;
108108

109109
/* The original input string */
110110
static const char *scanorig;
@@ -224,7 +224,7 @@ plpgsql_yylex(void)
224224
push_back_token(tok3, &aux3);
225225
push_back_token(tok2, &aux2);
226226
if (plpgsql_parse_word(aux1.lval.str,
227-
core_yy.scanbuf + aux1.lloc,
227+
core_yy_extra.scanbuf + aux1.lloc,
228228
true,
229229
&aux1.lval.wdatum,
230230
&aux1.lval.word))
@@ -264,7 +264,7 @@ plpgsql_yylex(void)
264264
* non-variable cases.
265265
*/
266266
if (plpgsql_parse_word(aux1.lval.str,
267-
core_yy.scanbuf + aux1.lloc,
267+
core_yy_extra.scanbuf + aux1.lloc,
268268
(!AT_STMT_START(plpgsql_yytoken) ||
269269
(tok2 == '=' || tok2 == COLON_EQUALS ||
270270
tok2 == '[')),
@@ -340,7 +340,7 @@ internal_yylex(TokenAuxData *auxdata)
340340
yyscanner);
341341

342342
/* remember the length of yytext before it gets changed */
343-
yytext = core_yy.scanbuf + auxdata->lloc;
343+
yytext = core_yy_extra.scanbuf + auxdata->lloc;
344344
auxdata->leng = strlen(yytext);
345345

346346
/* Check for << >> and #, which the core considers operators */
@@ -515,7 +515,7 @@ plpgsql_scanner_errposition(int location)
515515
void
516516
plpgsql_yyerror(const char *message)
517517
{
518-
char *yytext = core_yy.scanbuf + plpgsql_yylloc;
518+
char *yytext = core_yy_extra.scanbuf + plpgsql_yylloc;
519519

520520
if (*yytext == '\0')
521521
{
@@ -603,7 +603,7 @@ void
603603
plpgsql_scanner_init(const char *str)
604604
{
605605
/* Start up the core scanner */
606-
yyscanner = scanner_init(str, &core_yy,
606+
yyscanner = scanner_init(str, &core_yy_extra,
607607
&ReservedPLKeywords, ReservedPLKeywordTokens);
608608

609609
/*

0 commit comments

Comments
 (0)