[sf-perl] Calling perl from C and back again.

David Ljung Madison pm.org at daveola.com
Sun Jul 1 03:47:34 PDT 2007

I'm starting to answer my own question..

I've learned about the newXS() call that registers functions
so Perl can use them.

Evidently xsubpp creates code, including a "boot_main" that
does this registration (via newXSproto), but I'm guessing the 
boot_main is somehow naturally called when you start from Perl (i.e., 
when you write C code that you're calling from Perl).  I'm doing it 
somewhat backwards, from C->Perl->C, so it seems I have to call newXS 
myself.  I may be wrong, I'm certainly not an expert on this, but
at least I have the code doing the round trip from C to Perl and
back again.  I can post the code if anyone is interested - but
first to figure out how to deal with the Perl->C args when I'm
not using the XS tools to do it for me...


Dave Ljung Madison          http://GetDave.com/                415 341-5555
------------ "Preferred over shiny round objects 2-to-1" ------------------

More information about the SanFrancisco-pm mailing list