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

Michael Friedman friedman at highwire.stanford.edu
Sun Jul 1 10:04:59 PDT 2007


I hesitate to mention this, since I have no experience with it, but  
have you looked at Inline::C? Supposedly the Inline::* modules make a  
lot of this inter-language communication easier.

-- Mike

On Jul 1, 2007, at 3:47 AM, David Ljung Madison wrote:

> 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
>
> ---------------------------------------------------------------------- 
> -----
> Dave Ljung Madison          http://GetDave.com/                415  
> 341-5555
> ------------ "Preferred over shiny round objects 2-to-1"  
> ------------------
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm

---------------------------------------------------------------------
Michael Friedman                     HighWire Press
Phone: 650-725-1974                  Stanford University
FAX:   270-721-8034                  <friedman at highwire.stanford.edu>
---------------------------------------------------------------------




More information about the SanFrancisco-pm mailing list