Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow for using NULL as external $p5 for perls without multiplicity
Inline::Perl6 on a perl without multiplicity passes a NULL pointer as
my_perl. Detect this correctly and avoid creating a new perl interpreter.
  • Loading branch information
niner committed Feb 14, 2015
1 parent fa2e492 commit fbff133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Inline/Perl5.pm6
Expand Up @@ -621,8 +621,8 @@ class Perl5Callable {

my $default_perl5;
method BUILD(:$p5) {
$!p5 = $p5 // p5_init_perl();
$!external_p5 = defined $p5;
$!p5 = $p5 === Any ?? p5_init_perl() !! $p5;
$!external_p5 = $p5 !=== Any;

&!call_method = sub (Int $index, Str $name, OpaquePointer $args, OpaquePointer $err) returns OpaquePointer {
my $p6obj = $objects.get($index);
Expand Down

0 comments on commit fbff133

Please sign in to comment.