summaryrefslogtreecommitdiff
path: root/pp.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 /pp.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 'pp.c')
-rw-r--r--pp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pp.c b/pp.c
index f63b372edf..97a5cfba8a 100644
--- a/pp.c
+++ b/pp.c
@@ -295,13 +295,13 @@ PP(pp_av2arylen)
{
dSP;
AV *av = (AV*)TOPs;
- SV *sv = AvARYLEN(av);
- if (!sv) {
- AvARYLEN(av) = sv = NEWSV(0,0);
- sv_upgrade(sv, SVt_IV);
- sv_magic(sv, (SV*)av, PERL_MAGIC_arylen, Nullch, 0);
+ SV **sv = Perl_av_arylen_p(aTHX_ (AV*)av);
+ if (!*sv) {
+ *sv = NEWSV(0,0);
+ sv_upgrade(*sv, SVt_PVMG);
+ sv_magic(*sv, (SV*)av, PERL_MAGIC_arylen, Nullch, 0);
}
- SETs(sv);
+ SETs(*sv);
RETURN;
}