This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Only upgrade when necessary
authorLeon Timmermans <fawaka@gmail.com>
Sun, 18 Sep 2011 10:22:30 +0000 (12:22 +0200)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 18 Sep 2011 13:11:32 +0000 (06:11 -0700)
doio.c

diff --git a/doio.c b/doio.c
index e6e9016..022b499 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -2275,7 +2275,7 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
        /* suppress warning when reading into undef var (tchrist 3/Mar/00) */
        if (! SvOK(mstr))
            sv_setpvs(mstr, "");
-       sv_upgrade(mstr, SVt_PV);
+       SvUPGRADE(mstr, SVt_PV);
        SvPOK_only(mstr);
        mbuf = SvGROW(mstr, (STRLEN)msize+1);