X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.c;h=ce85a4bb89a06059ad049c836897b7744d28bbbb;hb=e09f3e01ccd721309f0eb0aae224d84db2e8436a;hp=ece94b93acfb835964795396bef411cb215ee304;hpb=63e4d8773d8e4bda5ca8583ec13c22520fce4101;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.c b/sv.c index ece94b9..ce85a4b 100644 --- a/sv.c +++ b/sv.c @@ -889,6 +889,7 @@ register SV *sv; STRLEN prevlen; int unref = 0; + sv_setpvn(t, "", 0); retry: if (!sv) { sv_catpv(t, "VOID"); @@ -1709,12 +1710,17 @@ STRLEN *lp; #endif } else if (SvIOKp(sv)) { + U32 oldIOK = SvIOK(sv); if (SvTYPE(sv) < SVt_PVIV) sv_upgrade(sv, SVt_PVIV); olderrno = errno; /* some Xenix systems wipe out errno here */ sv_setpvf(sv, "%Vd", SvIVX(sv)); errno = olderrno; s = SvEND(sv); + if (oldIOK) + SvIOK_on(sv); + else + SvIOKp_on(sv); } else { if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))