-
-
Save danopia/469913 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
ArgumentsStruct: cover { | |
val1: String | |
val2: Int | |
} | |
Arguments: cover from ArgumentsStruct* { | |
new: static func -> This { | |
gc_malloc(Arguments size) as This | |
} | |
init: func@(=val1, =val2) {} | |
} | |
args := Arguments new() | |
args init("val1", 42) | |
rock_tmp/./ffitest.c:84:29: error: used type 'ffitest__Arguments' (aka 'struct _ffitest__Arguments') where arithmetic or pointer type is required | |
ffitest__Arguments_init((ffitest__Arguments) &(args), "val1", 42); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment