]> granicus.if.org Git - flex/commitdiff
fix skeleton for reentrant scanners
authorWill Estes <wlestes@users.sourceforge.net>
Fri, 13 Apr 2007 16:32:31 +0000 (16:32 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Fri, 13 Apr 2007 16:32:31 +0000 (16:32 +0000)
flex.skl

index 368c5a66762a8d0e3da4a2b4476a23b9f7597112..c956a58f6998a7ad9dd0d5ff4c213665903c5536 100644 (file)
--- a/flex.skl
+++ b/flex.skl
@@ -1647,11 +1647,11 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
-       if ((yy_size_t) (yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+       if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                /* Extend the array by 50%, plus the number we really need. */
-               yy_size_t new_size = yy_n_chars + number_to_move + (yy_n_chars >> 1);
+               yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);
                YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
-                       (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size);
+                       (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG );
        }
 
        YY_G(yy_n_chars) += number_to_move;