Re: calling perl from C

2012-03-06 Thread Sisyphus
- Original Message - From: To: Sent: Monday, March 05, 2012 10:01 PM Subject: calling perl from C Hello, First, thanks for the Inline::C package, which is well build, and very usefull for me. ### Pleased you find it useful :-) In

Re: calling perl from C

2012-03-05 Thread Xiao Yafeng
Laurent, Like David said, before get thing you want to do done, you should understand how perl script runs first. perlcall, perlembed and perlguts would help you. On Mon, Mar 5, 2012 at 10:39 PM, David Mertens wrote: > Laurent, > > Extending the example in perlcall to work for repeated calls to

Re: calling perl from C [CLOSED]

2012-03-05 Thread laurent . habib
l.org > Objet : Re: calling perl from C > > Laurent, > > Extending the example in perlcall to work for repeated calls to Perl is not > hard, but you have clearly taken the wrong path. In particular, you should > have "dSP;" and "PUSHMARK(SP);" at

Re: calling perl from C

2012-03-05 Thread David Mertens
Laurent, Extending the example in perlcall to work for repeated calls to Perl is not hard, but you have clearly taken the wrong path. In particular, you should have "dSP;" and "PUSHMARK(SP);" at least once in your code, and I see you've removed them completely. Sometimes it's just hard to put all

Re: calling perl from C

2012-03-05 Thread laurent . habib
David, I have ever seen perlcall, there is an example for calling perl from C but once. (I test it  :: OK) When, C call perl, the sub is executed and did'nt return to C (memory wrap). May be a problem of c ontext. My interpretation is when C had call Perl, Perl is executed and ha

Re: calling perl from C

2012-03-05 Thread David Mertens
Laurent - Have you seen perlcall? http://perldoc.perl.org/perlcall.html Check out the examples section and see if they make sense. If not, let us know and we'll see if something is broken. FWIW, I've called Perl subs from my C code before, so I know it's possible. David On Mon, Mar 5, 2012 at 5

calling perl from C

2012-03-05 Thread laurent . habib
Hello, First, thanks for the Inline::C package, which is well build, and very usefull for me. I would like that "C code"   call   "perl sub"    but    many times. When I execute the script I have a "panic: memory wrap"... Is there a solution to do that... Thanks. Laurent  use Inline C; # us