Re: Poniedate #43

[email protected] (Tim Bunce) Mon, 1 Mar 2004 22:25:10 +0000
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
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.