INN commit: trunk/innfeed (configfile.l)

INN Commit rra at isc.org
Wed Aug 7 18:37:37 UTC 2013


    Date: Wednesday, August 7, 2013 @ 11:37:37
  Author: iulius
Revision: 9526

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:
  trunk/innfeed/configfile.l

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

Modified: configfile.l
===================================================================
--- configfile.l	2013-08-06 21:31:03 UTC (rev 9525)
+++ configfile.l	2013-08-07 18:37:37 UTC (rev 9526)
@@ -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