if (AvMAX(thing) != -1) {
/* an array with 10 slots has AvMax() set to 9 - te 2007-04-22 *
+/
total_size += sizeof(SV *) * (AvMAX(thing) + 1);
And AvMAX is defined as:
#define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max
Ie. It simply gets the value from a struct member.
It also references AvALLOC & AvARYLEN, but neither of those does anything with magic either:
#define AvARRAY(av) ((av)->sv_u.svu_array)
#define AvALLOC(av) (*((SV***)&((XPVAV*) SvANY(av))->xav_alloc))
#define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max
#define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill
#define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ MUTABLE_AV(av)))
The only "method" that touches magic is AvFILL:
#define AvFILL(av) ((SvRMAGICAL((const SV *) (av))) \
? mg_size(MUTABLE_SV(av)) : AvFILLp(av))
And AvFILL doesn't appear anywhere in the D::S source.
So, I say again, the bug does not lie with D::S.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|