Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove suspect PERL_SET_CONTEXT
  • Loading branch information
pmurias committed Oct 2, 2011
1 parent 8dbcaa8 commit bf4e20a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/p5embed.c
Expand Up @@ -22,17 +22,18 @@ void p5embed_initialize()
printf("# initialising perl\n");
PERL_SYS_INIT3(0,NULL,NULL);
PerlInterpreter* my_perl = perl_alloc();
PERL_SET_CONTEXT(my_perl);
perl_construct(my_perl);
char *embedding[] = { "", "-e", "0" };
perl_parse(my_perl, xs_init, 3, embedding, NULL);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
eval_pv("use lib 'perl5';use Niecza::Interoperability",TRUE);
// eval_pv("use lib 'perl5';use Niecza::Interoperability",TRUE);
printf("# initialised perl\n");
}

SV* p5embed_eval(char* code) {
printf("# evaling code <%s>...\n",code);
eval_pv("1",TRUE);
printf("# evaled 1\n");
SV* ret = eval_pv(code,TRUE);
printf("# survived evaling code...\n");
return ret;
Expand Down

0 comments on commit bf4e20a

Please sign in to comment.