I see you removed the "rvalue" reference...
Anyway, the code of D::S does this:
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.
In reply to Re^6: perl5.10 Devel::Size behaviour changed? (bug report)
by BrowserUk
in thread perl5.10 Devel::Size behaviour changed?
by sang1986
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |