Skip to content

Commit

Permalink
File-Glob/Glob.xs - more efficient mortal AV creation
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed Jan 28, 2024
1 parent 3ac780f commit 8f6ecd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/File-Glob/Glob.xs
Expand Up @@ -240,7 +240,7 @@ csh_glob(pTHX_ AV *entries, const char *pat, STRLEN len, bool is_utf8)
else sv_catpvn(word, piece, s-piece);
}
if (!word) break;
if (!patav) patav = (AV *)sv_2mortal((SV *)newAV());
if (!patav) patav = newAV_mortal();
av_push(patav, word);
word = NULL;
piece = NULL;
Expand Down

0 comments on commit 8f6ecd0

Please sign in to comment.