Perl_eval_pv() leaks 4 bytes every time it is called because it
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index 75cab91..70a7f53 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -502,8 +502,14 @@ S_incline(pTHX_ char *s)
 
     ch = *t;
     *t = '\0';
-    if (t - s > 0)
+    if (t - s > 0) {
+#ifdef USE_ITHREADS
+       Safefree(CopFILE(PL_curcop));
+#else
+       SvREFCNT_dec(CopFILEGV(PL_curcop));
+#endif
        CopFILE_set(PL_curcop, s);
+    }
     *t = ch;
     CopLINE_set(PL_curcop, atoi(n)-1);
 }
@@ -2946,8 +2952,7 @@ Perl_yylex(pTHX)
            PL_expect = XTERM;
        TOKEN('(');
     case ';':
-       if (CopLINE(PL_curcop) < PL_copline)
-           PL_copline = CopLINE(PL_curcop);
+       CLINE;
        tmp = *s++;
        OPERATOR(tmp);
     case ')':
@@ -7025,7 +7030,9 @@ Perl_scan_num(pTHX_ char *start)
           Strtol() and Strtoul() are used above.
 
           [1] XXX Configure test needed to check for atol()
-                  (and atoll() overflow behaviour) XXX --jhi
+                  (and atoll()) overflow behaviour XXX
+
+          --jhi
 
           We need to do this the hard way.  */
 
@@ -7039,14 +7046,16 @@ Perl_scan_num(pTHX_ char *start)
           don't need to do the conversion at all. 
 
           [1] Note that this is lossy if our NVs cannot preserve our
-          UVs.  There is a metaconfig define, NV_PRESERVES_UV, but we
-          really do hope all such platforms have strtou?ll? to do a
-          lossless IV/UV conversion.
-          XXX Configure test needed to check how many UV bits
-              do our NVs preserve, really (the current test checks
-              for the roundtrip of ~0) XXX --jhi
-              Maybe do some tricks with DBL_MANT_DIG and LDBL_MANT_DIG,
-              and DBL_DIG, LDBL_DIG (this is already available as NV_DIG)?
+          UVs.  There are metaconfig defines NV_PRESERVES_UV (a boolean)
+          and NV_PRESERVES_UV_BITS (a number), but in general we really
+          do hope all such potentially lossy platforms have strtou?ll?
+          to do a lossless IV/UV conversion.
+
+          Maybe could do some tricks with DBL_DIG, LDBL_DIG and
+          DBL_MANT_DIG and LDBL_MANT_DIG (these are already available
+          as NV_DIG and NV_MANT_DIG)?
+          
+          --jhi
           */
        {
            UV uv = U_V(nv);