in reply to Re: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
in thread Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

Hi,

Thanks for your reply!

I've tried to use Perl_get_context() (or dTHX) and got NULL.

Currently, I don't understand how to get the pointer of the interpreter of the Perl function that calls the C function.

My system structure:
Perl function --> C DLL --> Perl Callback

The requirement is that the Perl function and the Perl callback will work from the same context.


Many thanks and best regards,

Itamar

  • Comment on Re^2: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

Replies are listed 'Best First'.
Re^3: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
by salva (Canon) on Jul 08, 2014 at 13:44 UTC
    May your C DLL be loading and using Perl.DLL to resolve symbols instead of linking back to the perl executable?