X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=d9a4f0711385dec89ca20905ea27a9aa4c58baf8;hb=970322a2e8024294ada6e8d1a027cb98f1f48ee3;hp=c9750e6574dfae89f9c260107733b37b37ac270b;hpb=1e422769b80038b1bfc4f5af33438b87cc1c7a22;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index c9750e6..d9a4f07 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1,6 +1,6 @@ /* pp_hot.c * - * Copyright (c) 1991-1994, Larry Wall + * Copyright (c) 1991-1997, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -412,7 +412,6 @@ PP(pp_print) PP(pp_rv2av) { dSP; dPOPss; - AV *av; if (SvROK(sv)) { @@ -450,6 +449,8 @@ PP(pp_rv2av) if (op->op_flags & OPf_REF || op->op_private & HINT_STRICT_REFS) DIE(no_usym, "an ARRAY"); + if (dowarn) + warn(warn_uninit); if (GIMME == G_ARRAY) RETURN; RETPUSHUNDEF; @@ -487,9 +488,7 @@ PP(pp_rv2av) PP(pp_rv2hv) { - dSP; dTOPss; - HV *hv; if (SvROK(sv)) { @@ -527,6 +526,8 @@ PP(pp_rv2hv) if (op->op_flags & OPf_REF || op->op_private & HINT_STRICT_REFS) DIE(no_usym, "a HASH"); + if (dowarn) + warn(warn_uninit); if (GIMME == G_ARRAY) { SP--; RETURN; @@ -557,7 +558,7 @@ PP(pp_rv2hv) else { dTARGET; if (HvFILL(hv)) { - sprintf(buf, "%d/%d", HvFILL(hv), HvMAX(hv)+1); + sprintf(buf, "%ld/%ld", (long)HvFILL(hv), (long)HvMAX(hv)+1); sv_setpv(TARG, buf); } else @@ -1137,6 +1138,8 @@ do_readline() } else { sv = TARG; + if (SvROK(sv)) + sv_unref(sv); (void)SvUPGRADE(sv, SVt_PV); tmplen = SvLEN(sv); /* remember if already alloced */ if (!tmplen)