Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement get_pmc_keyed for P5Scalar
It's completely wrong in several ways, but it works, and I don't know of a less wrong way to make it happen.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# vim: ft=perl6 | ||
|
||
plan(3); | ||
|
||
my $p5code := '{ foo => 2, bar => 7 }'; | ||
|
||
pir::load_bytecode("perl5.pir"); | ||
my $p5obj := pir::compreg__ps("perl5").make_interp($p5code)(); | ||
|
||
ok($p5obj<foo> == 2, "can access p5 hashes"); | ||
ok($p5obj<bar> == 7, "different keys are distinct"); | ||
ok(!pir::defined($p5obj<baz>), "failure is reported"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters