summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-29 19:35:38 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-29 19:35:38 +0000
commita3874608cd3bf4e33ccd66b8bb03b2aeda20af14 (patch)
tree1dd180911ed35cffcf3ddf5a647ffaa26a16c150 /av.c
parent345d1b6f8b9605e2699c84cc5fc9a99a40bc982a (diff)
downloadperl-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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/av.c b/av.c
index 12b2ee3e41..72018939f9 100644
--- a/av.c
+++ b/av.c
@@ -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