Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
do not decont NativeRefs, the wonky way
This makes simple tests pass, but should probably get a proper fix. Most likely
in MoarVM itself.
  • Loading branch information
FROGGS committed Apr 3, 2015
1 parent 4edc1eb commit b07e78f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/vm/moar/QAST/QASTOperationsMAST.nqp
Expand Up @@ -2647,10 +2647,12 @@ QAST::MASTOperations.add_core_op('nativecall', -> $qastcomp, $op {
my int $n := nqp::elems(@args);
my $obj;
while $i < $n {
$obj := nqp::decont(nqp::atpos(@args, $i));
nqp::bindpos(@args, $i, nqp::can($obj, 'cstr')
?? nqp::decont($obj.cstr())
!! $obj);
$obj := nqp::atpos(@args, $i);
if nqp::reprname($obj) ne 'P6opaque' {
nqp::bindpos(@args, $i, nqp::can($obj, 'cstr')
?? nqp::decont($obj.cstr())
!! nqp::decont($obj));
}
$i++;
}
@args
Expand Down

0 comments on commit b07e78f

Please sign in to comment.