INN commit: branches/2.5/innfeed (configfile.l)

INN Commit rra at isc.org
Sun Aug 25 10:41:14 UTC 2013


    Date: Sunday, August 25, 2013 @ 03:41:14
  Author: iulius
Revision: 9530

do not use yyget_leng() function as it is not defined by old flex versions

Better keep using yyleng, still cast to size_t.

Modified:
  branches/2.5/innfeed/configfile.l

--------------+
 configfile.l |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Modified: configfile.l
===================================================================
--- configfile.l	2013-08-25 10:39:48 UTC (rev 9529)
+++ configfile.l	2013-08-25 10:41:14 UTC (rev 9530)
@@ -151,9 +151,11 @@
 
 	for (i = 1, strIdx = 0, sawBsl = 0 ; ; i++)
           {
-            /* Cast yyget_leng() to size_t because it used to be an int
-             * in flex versions anterior to 2.5.35 (not included). */
-            if (i < (size_t) yyget_leng())
+            /* Cast yyleng to size_t because it used to be an int
+             * in flex versions anterior or equal to 2.5.35.
+             * Do not use yyget_leng() here because old flex versions
+             * do not define it. */
+            if (i < (size_t) yyleng)
               current = yytext [i] ;
             else
               current = input() ;



More information about the inn-committers mailing list