Joshua N Pritikin wrote:
> >
> > I just read C code produced by Inline and found that - correct me if
> > I'm wrong - it just builds a wrapper around a C function.
> 
> Oh!  Indeed it does.  Hm hm.

I've been avoiding commenting on this thread, because these are Event
issues, and as long as Inline is working properly 'with' Event, I'm
happy.

But I feel like too much attention is being given to the 'wrapper'
issue. Inline just basically writes XS for you. The XS it writes is
pretty straightforward and the wrapper is pretty thin. Anybody writing
*straightforward* XS would do it pretty much the same way as Inline. You
almost always see XSUBS implemented as wrappers to native C functions.
The typemapping has to happen somewhere. 

For functions with return type of void, Inline adds a 2 line heuristic,
to see whether you meant truly void, or you want to push onto the return
stack. Other than that, all of the wrapper code is pure XS typemapping.

You have to keep it in perspective that we're coding in Perl, which is
*way* slow (in this context). Inline's strength is in reducing the
complexity by an order of magnitude. You can always write slightly
faster code using XS, but what problem would you be solving?

Brian

NOTE: For the future of Inline::C, I will be exposing as many XS and
MakeMaker features as I can, as long as the Inline interface can stay
clean. My goal is to make Inline an acceptable replacement for XS.


-- 
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'

Reply via email to