Skip to content

Commit

Permalink
Revert "Avoid a bit of deconting by binding the interpreter to the at…
Browse files Browse the repository at this point in the history
…tribute"

This reverts commit eaff08f due to segfaults
in complex (multi-threaded) applications with apprently broken my_perl pointers.
  • Loading branch information
niner committed Nov 16, 2021
1 parent 596b7df commit 901a6b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Inline/Perl5.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ method use(Str $module, **@args) {

submethod DESTROY {
$!p5.p5_destruct_perl() if $!p5 and not $!external_p5;
$!p5 := Inline::Perl5::Interpreter;
$!p5 = Inline::Perl5::Interpreter;
}


Expand Down Expand Up @@ -1200,7 +1200,7 @@ method restore_interpreter() {
%!gvs = Hash.new;
if $!default and $default_perl5 {
unless self === $default_perl5 {
$!p5 := $default_perl5.interpreter;
$!p5 = $default_perl5.interpreter;
$!objects = $default_perl5.object_keeper; #TOOD may actually need to merge
$default_perl5.required_modules.append: @!required_modules;
}
Expand Down Expand Up @@ -1420,7 +1420,7 @@ method initialize(Bool :$reinitialize) {
}
else {
my @args = @*ARGS;
$!p5 := Inline::Perl5::Interpreter::p5_init_perl(
$!p5 = Inline::Perl5::Interpreter::p5_init_perl(
@args.elems + 4,
CArray[Str].new('', '-e', '0', '--', |@args, Str),
&call_method,
Expand Down

0 comments on commit 901a6b9

Please sign in to comment.