diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-06 00:51:16 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-06 06:18:08 -0700 |
commit | 199f858d54d30a550be7320e065420353bca5318 (patch) | |
tree | d59886518fdbd5c6bb873ebe8e54526cb45f521f /pp_ctl.c | |
parent | dd2a7f9048da2c440a4dfed5122c0bfd98f079d3 (diff) | |
download | perl-199f858d54d30a550be7320e065420353bca5318.tar.gz |
Put AV defelem creation code in one place
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -2910,14 +2910,8 @@ PP(pp_goto) if (SP[-index]) SvREFCNT_inc_void_NN(sv_2mortal(SP[-index])); else { - SV * const lv = - sv_2mortal(newSV_type(SVt_PVLV)); - SP[-index] = lv; - LvTYPE(lv) = 'y'; - sv_magic(lv,NULL,PERL_MAGIC_defelem,NULL,0); - LvTARG(lv) = SvREFCNT_inc_simple_NN(arg); - LvSTARGOFF(lv) = AvFILLp(arg) - index; - LvTARGLEN(lv) = 1; + SP[-index] = sv_2mortal(newSVavdefelem(arg, + AvFILLp(arg) - index, 1)); } } SvREFCNT_dec(arg); |