Skip to content

Commit

Permalink
Merge 9529d0f into 44e4059
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed Jun 9, 2021
2 parents 44e4059 + 9529d0f commit b0accf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions av.c
Expand Up @@ -639,9 +639,11 @@ Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val)
{
PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH;

if (!*avp)
*avp = newAV();
av_push(*avp, val);
if (!*avp) {
*avp = newAV_alloc_xz(4);
AvARRAY(*avp)[ ++AvFILLp(*avp) ] = val;
} else
av_push(*avp, val);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion embed.fnc
Expand Up @@ -639,7 +639,7 @@ ApdR |AV* |av_make |SSize_t size|NN SV **strp
ApdR |AV* |av_new_alloc |SSize_t size|bool zeroflag
p |SV* |av_nonelem |NN AV *av|SSize_t ix
Apd |SV* |av_pop |NN AV *av
Apdoex |void |av_create_and_push|NN AV **const avp|NN SV *const val
Apdoe |void |av_create_and_push|NN AV **const avp|NN SV *const val
Apd |void |av_push |NN AV *av|NN SV *val
: Used in scope.c, and by Data::Alias
EXp |void |av_reify |NN AV *av
Expand Down

0 comments on commit b0accf5

Please sign in to comment.