Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set up some HLL interop configuration.
  • Loading branch information
jnthn committed Apr 9, 2013
1 parent a822ca4 commit 78665ec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -1847,3 +1847,19 @@ Perl6::Metamodel::GrammarHOW.set_default_parent_type(Grammar);

# Put PROCESS in place.
nqp::bindhllsym('perl6', 'PROCESS', PROCESS);

# HLL interop configuration.
nqp::sethllconfig('perl6', nqp::hash(
'null_value', Mu,
'foreign_type_int', Int,
'foreign_type_num', Num,
'foreign_type_str', Str,
'foreign_transform_array', -> $array {
pir::perl6_parcel_from_rpa__PPP($array, Mu)
},
'foreign_transform_hash', -> $hash {
my $result := nqp::create(Hash);
nqp::bindattr($result, EnumMap, '$!storage', $hash);
$result
}
));

0 comments on commit 78665ec

Please sign in to comment.