Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created October 28, 2011 21:17
Show Gist options
  • Save jnthn/1323590 to your computer and use it in GitHub Desktop.
Save jnthn/1323590 to your computer and use it in GitHub Desktop.
pir::nqp_bigint_setup__v();
my $knowhow := pir::get_knowhow__P();
my $bi_type := $knowhow.HOW.new_type(:name('TestBigInt'), :repr('P6bigint'));
$bi_type.HOW.compose($bi_type);
my $bi1 := nqp::create($bi_type);
say(nqp::unbox_i($bi1));
my $bi2 := nqp::box_i(42, $bi_type);
say(nqp::unbox_i($bi2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment