mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
flex code modernization: Replace YY_EXTRA_TYPE define with flex option
Replace #define YY_EXTRA_TYPE with %option extra-type. The latter is the way recommended by the flex manual (available since flex 2.5.34). Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/eb6faeac-2a8a-4b69-9189-c33c520e5b7b@eisentraut.org
This commit is contained in:
@ -46,7 +46,6 @@ struct replication_yy_extra_type
|
||||
/* Work area for collecting literals */
|
||||
StringInfoData litbuf;
|
||||
};
|
||||
#define YY_EXTRA_TYPE struct replication_yy_extra_type *
|
||||
|
||||
static void startlit(yyscan_t yyscanner);
|
||||
static char *litbufdup(yyscan_t yyscanner);
|
||||
@ -70,6 +69,7 @@ static void addlitchar(unsigned char ychar, yyscan_t yyscanner);
|
||||
%option noyyfree
|
||||
%option warn
|
||||
%option prefix="replication_yy"
|
||||
%option extra-type="struct replication_yy_extra_type *"
|
||||
|
||||
/*
|
||||
* Exclusive states:
|
||||
|
@ -41,7 +41,6 @@ struct syncrep_yy_extra_type
|
||||
{
|
||||
StringInfoData xdbuf;
|
||||
};
|
||||
#define YY_EXTRA_TYPE struct syncrep_yy_extra_type *
|
||||
|
||||
/* LCOV_EXCL_START */
|
||||
|
||||
@ -60,6 +59,7 @@ struct syncrep_yy_extra_type
|
||||
%option noyyfree
|
||||
%option warn
|
||||
%option prefix="syncrep_yy"
|
||||
%option extra-type="struct syncrep_yy_extra_type *"
|
||||
|
||||
/*
|
||||
* <xd> delimited identifiers (double-quoted identifiers)
|
||||
|
Reference in New Issue
Block a user