in reply to Re^4: 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?
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
by itamarat (Acolyte) on Jul 08, 2014 at 12:55 UTC | |
by salva (Canon) on Jul 08, 2014 at 13:17 UTC | |
by itamarat (Acolyte) on Jul 08, 2014 at 13:52 UTC | |
by salva (Canon) on Jul 08, 2014 at 14:27 UTC | |
by itamarat (Acolyte) on Jul 08, 2014 at 14:46 UTC | |
|