diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-29 19:35:38 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-29 19:35:38 +0000 |
commit | a3874608cd3bf4e33ccd66b8bb03b2aeda20af14 (patch) | |
tree | 1dd180911ed35cffcf3ddf5a647ffaa26a16c150 /av.c | |
parent | 345d1b6f8b9605e2699c84cc5fc9a99a40bc982a (diff) | |
download | perl-a3874608cd3bf4e33ccd66b8bb03b2aeda20af14.tar.gz |
Goodbye xav_arylen. You won't be missed that much.
So now there's a buy 5 get one free offer on PVAV bodies.
p4raw-id: //depot/perl@24619
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -936,6 +936,23 @@ Perl_av_exists(pTHX_ AV *av, I32 key) return FALSE; } +SV ** +Perl_av_arylen_p(pTHX_ AV *av) { + dVAR; + MAGIC *mg = mg_find((SV*)av, PERL_MAGIC_arylen_p); + + if (!mg) { + mg = sv_magicext((SV*)av, 0, PERL_MAGIC_arylen_p, 0, 0, 0); + + if (!mg) { + Perl_die(aTHX_ "panic: av_arylen_p"); + } + /* sv_magicext won't set this for us because we pass in a NULL obj */ + mg->mg_flags |= MGf_REFCOUNTED; + } + return &(mg->mg_obj); +} + /* * Local variables: * c-indentation-style: bsd |