From: Chip Salzenberg Date: Tue, 28 Jan 1997 11:11:15 +0000 (+1200) Subject: Avoid newRV_noinc() in IO, for compiling with old Perls X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d5cdeed8354ee0a0c6ca8a52abf57d6b5a67b41;p=p5sagit%2Fp5-mst-13.2.git Avoid newRV_noinc() in IO, for compiling with old Perls --- diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index daa22f6..8611b2d 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -136,8 +136,9 @@ new_tmpfile(packname = "IO::File") gv = (GV*)SvREFCNT_inc(newGVgen(packname)); hv_delete(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv), G_DISCARD); if (do_open(gv, "+>&", 3, FALSE, 0, 0, fp)) { - ST(0) = sv_2mortal(newRV_noinc((SV*)gv)); + ST(0) = sv_2mortal(newRV((SV*)gv)); sv_bless(ST(0), gv_stashpv(packname, TRUE)); + SvREFCNT_dec(gv); /* undo increment in newRV() */ } else { ST(0) = &sv_undef;