X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=toke.c;h=e34f796a7ff960524bcd782a16fb5fda8787e317;hb=1a6108908b085da4d14ad0cdf8549f193a6fb877;hp=25c3f3e1118f9cc1a5bbbce8e7b4d7640d12b96d;hpb=da51bb9b4f7f527464b5e38aca8bcb956de1bbbc;p=p5sagit%2Fp5-mst-13.2.git diff --git a/toke.c b/toke.c index 25c3f3e..e34f796 100644 --- a/toke.c +++ b/toke.c @@ -735,13 +735,12 @@ Perl_lex_end(pTHX) */ STATIC void -S_incline(pTHX_ char *s) +S_incline(pTHX_ const char *s) { dVAR; - char *t; - char *n; - char *e; - char ch; + const char *t; + const char *n; + const char *e; CopLINE_inc(PL_curcop); if (*s++ != '#') @@ -781,34 +780,48 @@ S_incline(pTHX_ char *s) if (*e != '\n' && *e != '\0') return; /* false alarm */ - ch = *t; - *t = '\0'; if (t - s > 0) { + const STRLEN len = t - s; #ifndef USE_ITHREADS const char * const cf = CopFILE(PL_curcop); STRLEN tmplen = cf ? strlen(cf) : 0; if (tmplen > 7 && strnEQ(cf, "(eval ", 6)) { /* must copy *{"::_<(eval N)[oldfilename:L]"} * to *{"::_op_private |= OPpENTERSUB_NOPAREN;