]> git.saurik.com Git - cycript.git/commitdiff
Worked around the bug in flex 2.5.35 that causes yy_size_t/int comparison warnings.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Dec 2009 22:04:39 +0000 (22:04 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Dec 2009 22:04:39 +0000 (22:04 +0000)
Cycript.l.in
makefile

index 5b4d5d9cfbbc7da338cdb4f9979b5fbdfc4b6c96..70d4e5377c7438e423c13f7d7a162dfd65713f36 100644 (file)
@@ -347,7 +347,7 @@ XMLName {XMLNameStart}{XMLNamePart}*
     char *value(reinterpret_cast<char *>(apr_palloc(yyextra->pool_, yyleng)));
     char *local(value);
 
-    for (size_t i(1); i != yyleng - 1; ++i) {
+    for (yy_size_t i(1), e(yyleng - 1); i != e; ++i) {
         char next(yytext[i]);
 
         if (yytext[i] == '\\')
index 190fbb49ea4fa37dfe29602922c5c0b8e4b6588a..42ba7d6e9945435b901f1c6f75198d42cdb24887 100644 (file)
--- a/makefile
+++ b/makefile
@@ -121,7 +121,7 @@ Cycript.tab.cc Cycript.tab.hh location.hh position.hh: Cycript.yy
        bison -v --report=state $<
 
 lex.cy.c: Cycript.l
-       flex $<
+       flex -t $< | sed -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@
 
 #Parser.hpp: Parser.py Parser.dat
 #      ./Parser.py <Parser.dat >$@