toke.c:scan_const: Don’t use PL_bufptr
authorFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 21:51:29 +0000 (14:51 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 21:51:29 +0000 (14:51 -0700)
PL_bufptr is passed in as an argument, yet scan_const was some-
times looking at its argument (start) and sometimes using PL_bufptr
directly.  This is just confusing.

toke.c

diff --git a/toke.c b/toke.c
index 31eefea..d6df9ed 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3855,8 +3855,8 @@ S_scan_const(pTHX_ char *start)
     }
 
     /* return the substring (via pl_yylval) only if we parsed anything */
-    if (s > PL_bufptr) {
-       char *s2 = PL_bufptr;
+    if (s > start) {
+       char *s2 = start;
        for (; s2 < s; s2++) {
            if (*s2 == '\n')
                COPLINE_INC_WITH_HERELINES;