On Tue, 28 Nov 2000, Dan Sugalski wrote:
> >I also like the suggestion that rather than supply flags, we should
> >follow the lead and supply a Perl* something that would return an
> >appropriate bunch of text to the parser.
> 
> I'd really rather not, since that would place the burden of knowing too 
> much about the guts of perl on whoever's using it. I don't want to do that.

You're going to need knowledge in either case - whether you're directly
setting flags or have a PerlFlags object (with its own limited interface,
I suppose) that you pass in.   The advantage of the object is that you aren't
limited to just flags down the road, which may cut down on the number of
overall API calls that exist.

Of course, if you've got a couple dozen actual flags, you may want to combine
the two:

PerlFlags *flags_and_such;

PAPI_set_flags(flags_and_such, PL_DONT_CRASH | PL_RUN_FASTER | PL_DWIM);

PAPI_set_malloc_arena(flags_and_such, *malloc_func, *arena); 

return_code = perl6_parse(interp, source, flags_and_such, NULLP);


 -- 
Bryan C. Warnock
bwarnock@(gtemail.net|capita.com)

Reply via email to