This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
clone awareness for change#5847
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index ff21757..11e1b11 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4743,6 +4743,25 @@ Perl_newSViv(pTHX_ IV i)
 }
 
 /*
+=for apidoc newSVuv
+
+Creates a new SV and copies an unsigned integer into it.
+The reference count for the SV is set to 1.
+
+=cut
+*/
+
+SV *
+Perl_newSVuv(pTHX_ UV u)
+{
+    register SV *sv;
+
+    new_SV(sv);
+    sv_setuv(sv,u);
+    return sv;
+}
+
+/*
 =for apidoc newRV_noinc
 
 Creates an RV wrapper for an SV.  The reference count for the original
@@ -5168,6 +5187,7 @@ Perl_sv_reftype(pTHX_ SV *sv, int ob)
        case SVt_PVCV:          return "CODE";
        case SVt_PVGV:          return "GLOB";
        case SVt_PVFM:          return "FORMAT";
+       case SVt_PVIO:          return "IO";
        default:                return "UNKNOWN";
        }
     }
@@ -6972,6 +6992,9 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max)
                ncx->blk_loop.iterdata  = (CxPADLOOP(cx)
                                           ? cx->blk_loop.iterdata
                                           : gv_dup((GV*)cx->blk_loop.iterdata));
+               ncx->blk_loop.oldcurpad
+                   = (SV**)ptr_table_fetch(PL_ptr_table,
+                                           cx->blk_loop.oldcurpad);
                ncx->blk_loop.itersave  = sv_dup_inc(cx->blk_loop.itersave);
                ncx->blk_loop.iterlval  = sv_dup_inc(cx->blk_loop.iterlval);
                ncx->blk_loop.iterary   = av_dup_inc(cx->blk_loop.iterary);