Sync with libnet 1.17
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index 0c4c692..7cbc00b 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -141,7 +141,7 @@ PP(pp_concat)
 
     if (TARG == right && right != left) {
        right = sv_2mortal(newSVpvn(rpv, rlen));
-       rpv = SvPV(right, rlen);        /* no point setting UTF8 here */
+       rpv = SvPV(right, rlen);        /* no point setting UTF-8 here */
        rcopied = TRUE;
     }
 
@@ -1569,18 +1569,6 @@ Perl_do_readline(pTHX)
            MAYBE_TAINT_LINE(io, sv);
            RETURN;
        }
-       if (SvUTF8(sv)) {
-            U8 *s = (U8*)SvPVX(sv) + offset;
-            STRLEN len = SvCUR(sv) - offset;
-            U8 *f;
-
-            if (ckWARN(WARN_UTF8) &&
-                !Perl_is_utf8_string_loc(aTHX_ s, len, &f))
-                 /* Emulate :encoding(utf8) warning in the same case. */
-                 Perl_warner(aTHX_ packWARN(WARN_UTF8),
-                             "utf8 \"\\x%02X\" does not map to Unicode",
-                             f < (U8*)SvEND(sv) ? *f : 0);
-       }
        MAYBE_TAINT_LINE(io, sv);
        IoLINES(io)++;
        IoFLAGS(io) |= IOf_NOLINE;
@@ -1605,6 +1593,17 @@ Perl_do_readline(pTHX)
                (void)POPs;             /* Unmatched wildcard?  Chuck it... */
                continue;
            }
+       } else if (SvUTF8(sv)) { /* OP_READLINE, OP_RCATLINE */
+            U8 *s = (U8*)SvPVX(sv) + offset;
+            STRLEN len = SvCUR(sv) - offset;
+            U8 *f;
+            
+            if (ckWARN(WARN_UTF8) &&
+                !Perl_is_utf8_string_loc(aTHX_ s, len, &f))
+                 /* Emulate :encoding(utf8) warning in the same case. */
+                 Perl_warner(aTHX_ packWARN(WARN_UTF8),
+                             "utf8 \"\\x%02X\" does not map to Unicode",
+                             f < (U8*)SvEND(sv) ? *f : 0);
        }
        if (gimme == G_ARRAY) {
            if (SvLEN(sv) - SvCUR(sv) > 20) {
@@ -1873,8 +1872,7 @@ PP(pp_iter)
     }
     if (sv && SvREFCNT(sv) == 0) {
        *itersvp = Nullsv;
-       Perl_croak(aTHX_
-           "Use of freed value in iteration (perhaps you modified the iterated array within the loop?)");
+       Perl_croak(aTHX_ "Use of freed value in iteration");
     }
 
     if (sv)