This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] Re: replacing "inuse" Win files (was Re: Help with a Cwd.pm build error)
[perl5.git] / av.c
diff --git a/av.c b/av.c
index fc6fca3..ede01a7 100644 (file)
--- a/av.c
+++ b/av.c
@@ -1,7 +1,7 @@
 /*    av.c
  *
  *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -239,13 +239,13 @@ Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval)
     if (key > AvFILLp(av)) {
        if (!lval)
            return 0;
-       sv = NEWSV(5,0);
+       sv = newSV(0);
        return av_store(av,key,sv);
     }
     if (AvARRAY(av)[key] == &PL_sv_undef) {
     emptyness:
        if (lval) {
-           sv = NEWSV(6,0);
+           sv = newSV(0);
            return av_store(av,key,sv);
        }
        return 0;
@@ -362,12 +362,12 @@ Creates a new AV.  The reference count is set to 1.
 AV *
 Perl_newAV(pTHX)
 {
-    register AV * const av = (AV*)NEWSV(3,0);
+    register AV * const av = (AV*)newSV(0);
 
     sv_upgrade((SV *)av, SVt_PVAV);
     /* sv_upgrade does AvREAL_only()  */
     AvALLOC(av) = 0;
-    SvPV_set(av, (char*)0);
+    SvPV_set(av, NULL);
     AvMAX(av) = AvFILLp(av) = -1;
     return av;
 }
@@ -385,7 +385,7 @@ will have a reference count of 1.
 AV *
 Perl_av_make(pTHX_ register I32 size, register SV **strp)
 {
-    register AV * const av = (AV*)NEWSV(8,0);
+    register AV * const av = (AV*)newSV(0);
 
     sv_upgrade((SV *) av,SVt_PVAV);
     /* sv_upgrade does AvREAL_only()  */
@@ -399,7 +399,7 @@ Perl_av_make(pTHX_ register I32 size, register SV **strp)
        AvMAX(av) = size - 1;
        for (i = 0; i < size; i++) {
            assert (*strp);
-           ary[i] = NEWSV(7,0);
+           ary[i] = newSV(0);
            sv_setsv(ary[i], *strp);
            strp++;
        }
@@ -482,7 +482,7 @@ Perl_av_undef(pTHX_ register AV *av)
     }
     Safefree(AvALLOC(av));
     AvALLOC(av) = 0;
-    SvPV_set(av, (char*)0);
+    SvPV_set(av, NULL);
     AvMAX(av) = AvFILLp(av) = -1;
 }