X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=av.c;h=1f0d94a9530a3d5484a83422f9fe9a44241d49ea;hb=ca63f0d242a6920af7209f1a190c17b7800ce145;hp=f3c69e76ce2dcf23ff21384f07088fadc9b08e93;hpb=33c2748902d07b7ec367f87ad66e61e89f2aa994;p=p5sagit%2Fp5-mst-13.2.git diff --git a/av.c b/av.c index f3c69e7..1f0d94a 100644 --- a/av.c +++ b/av.c @@ -1,6 +1,6 @@ /* av.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, 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. @@ -175,10 +175,7 @@ av_fetch(register AV *av, I32 key, I32 lval) if (key > AvFILLp(av)) { if (!lval) return 0; - if (AvREALISH(av)) - sv = NEWSV(5,0); - else - sv = sv_newmortal(); + sv = NEWSV(5,0); return av_store(av,key,sv); } if (AvARRAY(av)[key] == &PL_sv_undef) { @@ -217,7 +214,7 @@ av_store(register AV *av, I32 key, SV *val) } if (SvREADONLY(av) && key >= AvFILL(av)) - croak(no_modify); + croak(PL_no_modify); if (SvRMAGICAL(av)) { if (mg_find((SV*)av,'P')) { @@ -336,7 +333,7 @@ av_clear(register AV *av) /*SUPPRESS 560*/ if (SvREADONLY(av)) - croak(no_modify); + croak(PL_no_modify); /* Give any tie a chance to cleanup first */ if (SvRMAGICAL(av)) @@ -396,7 +393,7 @@ av_push(register AV *av, SV *val) if (!av) return; if (SvREADONLY(av)) - croak(no_modify); + croak(PL_no_modify); if (mg = SvTIED_mg((SV*)av, 'P')) { dSP; @@ -424,7 +421,7 @@ av_pop(register AV *av) if (!av || AvFILL(av) < 0) return &PL_sv_undef; if (SvREADONLY(av)) - croak(no_modify); + croak(PL_no_modify); if (mg = SvTIED_mg((SV*)av, 'P')) { dSP; PUSHSTACKi(PERLSI_MAGIC); @@ -458,7 +455,7 @@ av_unshift(register AV *av, register I32 num) if (!av || num <= 0) return; if (SvREADONLY(av)) - croak(no_modify); + croak(PL_no_modify); if (mg = SvTIED_mg((SV*)av, 'P')) { dSP; @@ -510,7 +507,7 @@ av_shift(register AV *av) if (!av || AvFILL(av) < 0) return &PL_sv_undef; if (SvREADONLY(av)) - croak(no_modify); + croak(PL_no_modify); if (mg = SvTIED_mg((SV*)av, 'P')) { dSP; PUSHSTACKi(PERLSI_MAGIC);