----- Original Message ----- From: "Mark T. Kennedy" <[EMAIL PROTECTED]> . . > > void pass_to_perl (void *p) > { > Inline_Stack_Vars; > Inline_Stack_Push (newSVpvf ("this is an arg string")); > Inline_Stack_Done; > call_pv ("main::callback", 0); > Inline_Stack_Void; > } >
I have found the Inline_Stack_Vars to be deficient when it comes to callbacks - and they're use often results in segfaults (wrt callbacks). The Inline_Stack_Vars don't provide calls like 'ENTER', 'LEAVE', 'SAVETMPS', 'FREETMPS' and 'PUSHMARK(SP)' - and I think these are often needed when performing callbacks. Do away with the 'Inline_Stack_Vars' for callbacks and check out 'perldoc perlcall'. It has many code examples that work fine in Inline::C scripts. Hopefully there's an example there to suit your needs. Cheers, Rob