Is there a Perl syntax for getting interpreter pointer?
You can pass it around from XS to C using the pTHX and aTHX (and pTHX_ and pTHX_) macros. Another option is to retrieve the current Perl interpreter calling Perl_get_context(). It is more or less explained on perlguts.
Also, search CPAN for code containing call_sv and see how others have done it!
In reply to Re^5: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
by salva
in thread Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
by itamarat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |