Re: The external interface for the parser piece
[email protected] (Dan Sugalski) Wed, 13 Dec 2000 23:25:19 -0500
| Newsgroups | perl.perl6.internals.api.parser |
|---|---|
| Message-ID | <[email protected]> |
At 02:36 PM 12/13/00 +0000, Nicholas Clark wrote: >Ah. Digest system tells me some messages for me bounced. > > > From: Damien Neil <[email protected]> > > On Mon, Nov 27, 2000 at 05:29:36PM -0500, Dan Sugalski wrote: > > > int perl6_parse(PerlInterp *interp, > > > void *source, > > > int flags, > > > void *extra_pointer); > > > > Count me in with the people who prefer: > > > > int perl6_parse(PerlInterp *interp, PerlIO *io); > > > > I understand the desire to reduce the number of API bits the external > > user needs to know about, but I think that the non-PerlIO API will > > lead to more complexity than it removes. > > > > Assuming the non-PerlIO interface is used, however, I believe there > > is a problem with the PERL_GENERATED_SOURCE option. ANSI/ISO C does > > not guarantee that a function pointer may be stored in a void*. > > > > I would suggest that Perl's external APIs, at the very least, should > > conform to standard C. > > > > - Damien > >Not sure if it's what prompted you to say this, but perl5-porters has >recently turned up one such system, Cray PVP (SV1 or YMP) >It doesn't like casting between data pointers and function pointers: I was under the impression that ANSI C required that a void * be large enough to store any pointer type in it. Whether that's true or not's irrelevant at the moment, though we can work something out at some point later. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [email protected] have teddy bears and even teddy bears get drunk