summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-09 21:01:42 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-09 21:01:42 +0000
commit1b20cd17751091e44beebad6f2f7034a08eaa442 (patch)
tree38ec17ef74f8777c4538d150486291149faaabc5 /av.c
parent83bf042f79af6208af0620b081ee65543ecfed9f (diff)
downloadperl-1b20cd17751091e44beebad6f2f7034a08eaa442.tar.gz
$r = do {my @a; \$#a}; $$r = 503 # is also naughty and now warns
p4raw-id: //depot/perl@24784
Diffstat (limited to 'av.c')
-rw-r--r--av.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/av.c b/av.c
index e5cbe2f483..70ed1867f0 100644
--- a/av.c
+++ b/av.c
@@ -940,21 +940,14 @@ Perl_av_arylen_p(pTHX_ AV *av) {
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);
+ mg = sv_magicext((SV*)av, 0, PERL_MAGIC_arylen_p, &PL_vtbl_arylen_p,
+ 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;
-
- /* This is very naughty, but we don't want SvRMAGICAL() set on the
- hash, because it slows down all accesses. If we pass in a vtable
- to sv_magicext then it is (correctly) set for us. However, the only
- entry in our vtable is for free, and mg_free always calls the free
- vtable entry irrespective of the flags, so it doesn't actually
- matter that the R flag is off. */
- mg->mg_virtual = &PL_vtbl_arylen_p;
}
return &(mg->mg_obj);
}