This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
newSV() + sv_upgrade() => newSV_type()
authorNicholas Clark <nick@ccl4.org>
Wed, 9 Jan 2008 11:34:41 +0000 (11:34 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 9 Jan 2008 11:34:41 +0000 (11:34 +0000)
p4raw-id: //depot/perl@32912

pp_ctl.c

index b1a4fd3..07f8504 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3209,8 +3209,7 @@ PP(pp_require)
        if (vms_unixname)
 #endif
        {
-           namesv = newSV(0);
-           sv_upgrade(namesv, SVt_PV);
+           namesv = newSV_type(SVt_PV);
            for (i = 0; i <= AvFILL(ar); i++) {
                SV * const dirsv = *av_fetch(ar, i, TRUE);