mine = Perl_get_context(); #### dSP; #### mine #### mine = Perl_get_context(); #### mine = Perl_get_context(); #### void dorunperlfunction() { if (mine) { PERL_SET_CONTEXT(mine); dSP; ENTER; SAVETMPS; PUSHMARK(SP); PUTBACK; call_pv("functionname", G_DISCARD|G_NOARGS); FREETMPS; LEAVE; } #### PerlInterpreter * mine = NULL; ... void setcallback() CODE: ... mine = Perl_get_context(); ...