-
-
Save gerdr/02a79383788fb1254978 to your computer and use it in GitHub Desktop.
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
my $blob := nqp::bloballoc(42); | |
my $intptr := nqp::cscalar(Nil, 5); # no HOW | |
# 5 is the magic number for 'int' | |
my $ptr := nqp::blobptr($blob, $intptr); | |
nqp::assign($ptr, 12345); # boxed | |
my $val := nqp::cscalar_decont_i($ptr); # native | |
nqp::say($val); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment