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
use NativeCall; | |
class MVMCollectable is repr('CStruct') { | |
has uint32 $.owner; | |
has uint16 $.flags; | |
has uint16 $.size; | |
} | |
my int8 $x = 42; | |
say nativecast(MVMCollectable, OpaquePointer.new($x.WHERE)) | |
# OUTPUT MVMCollectable.new(owner => 1, flags => 0, size => 40) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment