Re: Callbacks to perl in a loop

2004-09-14 Thread Sisyphus
Hi again, In the end I found some code in 'perldoc perlcall' that works with inline just fine - called from both perl and C - as many times as I want. It will do quite nicely. The 'call_me_stupid' function now looks like this: void call_me_stupid(int a, int b) { dSP ; ENTER ; SAVE

Re: Callbacks to perl in a loop

2004-09-13 Thread Sisyphus
Eric Wilhelm wrote: # The following was supposedly scribed by # Sisyphus # on Monday 13 September 2004 10:47 pm: void call_me_stupid(int a, int b) { Inline_Stack_Vars; Inline_Stack_Reset; Inline_Stack_Push(sv_2mortal(newSViv(a))); Inline_Stack_Push(sv_2mortal(newSViv(b))); Inli

Re: Callbacks to perl in a loop

2004-09-13 Thread Eric Wilhelm
# The following was supposedly scribed by # Sisyphus # on Monday 13 September 2004 10:47 pm: >void call_me_stupid(int a, int b) { > Inline_Stack_Vars; > Inline_Stack_Reset; > Inline_Stack_Push(sv_2mortal(newSViv(a))); > Inline_Stack_Push(sv_2mortal(newSViv(b))); > Inline_S