From: Will Estes Date: Sun, 5 Feb 2012 23:28:54 +0000 (+0000) Subject: fix yywrap behavior for reentrant scanners X-Git-Tag: flex-2-5-36~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68f87a3f63319dd6dbc88ed2802054fa8c559a3e;p=flex fix yywrap behavior for reentrant scanners --- diff --git a/main.c b/main.c index 493c636..fef16f4 100644 --- a/main.c +++ b/main.c @@ -1578,9 +1578,11 @@ void readin () } if (!do_yywrap) { - if (!C_plus_plus) { - outn ("\n#define yywrap() 1"); - } + if (!C_plus_plus) + if (reentrant) + outn ("\n#define yywrap(yyscanner) 1"); + else + outn ("\n#define yywrap() 1"); outn ("#define YY_SKIP_YYWRAP"); }