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

This commit is contained in:
KimLS 2025-11-23 23:57:06 -08:00
parent e544f72da0
commit 42a3780d80

View File

@ -75,7 +75,7 @@ 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);
@ -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);