From 42a3780d80c015887beaa0e2b747f151f0e8ce7f Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 23 Nov 2025 23:57:06 -0800 Subject: [PATCH] PERL_SET_INTERP causes an issue on newer versions of perl on windows because a symbol is not properly exported in their API, change the lines so it's basically what it used to be --- zone/embperl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zone/embperl.cpp b/zone/embperl.cpp index b48c714e3..75bc1793c 100644 --- a/zone/embperl.cpp +++ b/zone/embperl.cpp @@ -75,15 +75,15 @@ void Embperl::DoInit() throw "Failed to init Perl (perl_alloc)"; } PERL_SET_CONTEXT(my_perl); - PERL_SET_INTERP(my_perl); + PL_curinterp = (PerlInterpreter*)(my_perl); PL_perl_destruct_level = 1; perl_construct(my_perl); perl_parse(my_perl, xs_init, argc, argv, nullptr); perl_run(my_perl); - + //a little routine we use a lot. eval_pv("sub my_eval { eval $_[0];}", TRUE); //dies on error - + //ruin the perl exit and command: eval_pv("sub my_exit {}", TRUE); eval_pv("sub my_sleep {}", TRUE); @@ -95,7 +95,7 @@ void Embperl::DoInit() GvCV_set(sleepgp, perl_get_cv("my_sleep", TRUE)); //dies on error GvIMPORTED_CV_on(sleepgp); } - + //declare our file eval routine. try { init_eval_file(); @@ -181,7 +181,7 @@ Embperl::~Embperl() void Embperl::Reinit() { PERL_SET_CONTEXT(my_perl); - PERL_SET_INTERP(my_perl); + PL_curinterp = (PerlInterpreter*)(my_perl); PL_perl_destruct_level = 1; perl_destruct(my_perl); perl_free(my_perl);