Front page | perl.ponie.dev |
Postings from March 2004
Re: Poniedate #43
From:
Tim Bunce
Date:
March 1, 2004 14:24
Subject:
Re: Poniedate #43
Message ID:
20040301222510.GB29142@dansat.data-plan.com
On Mon, Mar 01, 2004 at 03:41:32PM +0000, Arthur Bergman wrote:
>
> On 1 Mar 2004, at 15:27, Benjamin K Stuhl wrote:
>
> >
> >&(xav->xav_array) ? Shouldn't that just be ((SV**)(xav->xav_array)) to
> >match the standard definition of AvARRAY? Typo or is there something
> >more subtle going on?
> >
> >-- BKS
> >
>
> There is something more subtle going on.
>
> the macro is
>
> #define AvARRAY(av) ( * PL_macro_AvARRAY(aTHX_ (AV*)av) )
>
> and then
>
> SV*** Perl_macro_AvARRAY(aTHX_ AV* av) {
> XPVAV* data = Parrot_PMC_get_pointer(PL_parrot, SvANY(sv));
> return &(data->xav_array)
> }
Seeing that reminds me of one of Larry's sayings: "You can solve
any problem by adding a level of indirection--except the problem
of having too many levels of indirection."
:-/
Tim.