diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2021-06-14 23:02:52 +0100 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2021-07-03 02:40:33 +0100 |
commit | 310f47b68123831258bf28d4105fd80f8ed59430 (patch) | |
tree | c2ae9383dbdf3cc8fc1b89a5fa737c6cbbc9b625 /pad.c | |
parent | 84c75204391437a2f1d2f579c545b4592014b1cb (diff) | |
download | perl-310f47b68123831258bf28d4105fd80f8ed59430.tar.gz |
Perl_pad_alloc: simplify av_fetch() calls
The nature of PL_comppad allows this.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -719,7 +719,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype) pad_reset(); if (tmptype == SVs_PADMY) { /* Not & because this ‘flag’ is 0. */ /* For a my, simply push a null SV onto the end of PL_comppad. */ - sv = *av_fetch(PL_comppad, AvFILLp(PL_comppad) + 1, TRUE); + sv = *av_store_simple(PL_comppad, AvFILLp(PL_comppad) + 1, newSV(0)); retval = (PADOFFSET)AvFILLp(PL_comppad); } else { @@ -746,7 +746,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype) if (++retval <= names_fill && (pn = names[retval]) && PadnamePV(pn)) continue; - sv = *av_fetch(PL_comppad, retval, TRUE); + sv = *av_fetch_simple(PL_comppad, retval, TRUE); if (!(SvFLAGS(sv) & #ifdef USE_PAD_RESET (konst ? SVs_PADTMP : 0) |