This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.c: Avoid redundant gv_AVadd and GvAVn
authorFather Chrysostomos <sprout@cpan.org>
Sat, 26 Oct 2013 12:42:08 +0000 (05:42 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 26 Oct 2013 12:42:08 +0000 (05:42 -0700)
commitb188953e9dd3c8a2696f2e1ea1f59ccc6a80d81f
tree4dc51950d2caeebc389cc9eaa196839fd2c6be73
parente17aed30f88453e866224b8226836acc4cbc3824
perl.c: Avoid redundant gv_AVadd and GvAVn

We don’t need to call gv_AVadd if follewed by GvAVn, which itself
calls gv_AVadd when the AV is null.

Also, we don’t need to keep checking whether GvAV(PL_argvgv) is still
defined (via GvAVn with the final n) when pushing on to it.

This code goes back at least to perl 5 alpha 2.
perl.c