diff options
| author | Peter Eisentraut | 2025-01-06 08:47:58 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2025-01-06 08:47:58 +0000 |
| commit | b1ef48980ddd082a90ed39aa5914af45e53059e6 (patch) | |
| tree | 9d97adbc87951cdf5180c8b801a555c3d8a5776b /src/backend/replication | |
| parent | 632384d0eb142f243fdd6059fde715319cfd05c9 (diff) | |
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
Diffstat (limited to 'src/backend/replication')
| -rw-r--r-- | src/backend/replication/repl_scanner.l | 2 | ||||
| -rw-r--r-- | src/backend/replication/syncrep_scanner.l | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/repl_scanner.l b/src/backend/replication/repl_scanner.l index 0d1ac2d2389..de10cb5abd1 100644 --- a/src/backend/replication/repl_scanner.l +++ b/src/backend/replication/repl_scanner.l @@ -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: diff --git a/src/backend/replication/syncrep_scanner.l b/src/backend/replication/syncrep_scanner.l index 4db67329956..05e5fdecf1b 100644 --- a/src/backend/replication/syncrep_scanner.l +++ b/src/backend/replication/syncrep_scanner.l @@ -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) |
