develooper Front page | perl.perl6.internals | Postings from October 2001

Re: PMCs and how the opcode functions will work

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
October 10, 2001 08:33
Subject:
Re: PMCs and how the opcode functions will work
Message ID:
5.1.0.14.2.20011010113254.025828f8@pop.sidhe.org
At 11:27 AM 10/10/2001 +0200, Paolo Molaro wrote:
>On 10/09/01 Dan Sugalski wrote:
> > >For sanity's sake, I don't suppose you'd consider
> > >
> > >typedef void* (*vtable_func_t)();
> > >
> > >to make it
> > >
> > >vtable_func_t vtable_funcs[VTABLE_SIZE];
> >
> > I'd be thrilled. Abstract types are A Good Thing. In fact, I'll go make it
> > so right now. :)
>
>... and to go a step further in sanity and maintainability, I'd suggest
>using a structure with properly typed function pointers instead of an
>array:
>
>typedef void (*parrot_pmc_add)     (PMC *dest, PMC *a, PMC *b);
>typedef void (*parrot_pmc_dispose) (PMC *cookie);
>...

If all the versions of the add routine take the same parameters, we'll end 
up doing this. At the moment I'm not 100% sure they will. (Probably, but...)

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About