mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +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:
@@ -34,7 +34,6 @@ struct jsonpath_yy_extra_type
|
||||
{
|
||||
JsonPathString scanstring;
|
||||
};
|
||||
#define YY_EXTRA_TYPE struct jsonpath_yy_extra_type *
|
||||
|
||||
static void addstring(bool init, char *s, int l, yyscan_t yyscanner);
|
||||
static void addchar(bool init, char c, yyscan_t yyscanner);
|
||||
@@ -64,6 +63,7 @@ fprintf_to_ereport(const char *fmt, const char *msg)
|
||||
%option noyywrap
|
||||
%option warn
|
||||
%option prefix="jsonpath_yy"
|
||||
%option extra-type="struct jsonpath_yy_extra_type *"
|
||||
%option reentrant
|
||||
%option bison-bridge
|
||||
%option noyyalloc
|
||||
|
||||
Reference in New Issue
Block a user