21 lines
585 B
Plaintext
21 lines
585 B
Plaintext
native :: import "../include/native.h"
|
|
|
|
pass_alias :: func(value native.imported_int_alias) native.imported_int {
|
|
return value
|
|
}
|
|
|
|
main :: func() void {
|
|
_ = native.imported_add(pass_alias(20), 22)
|
|
_ = native.imported_scalar(3, 4)
|
|
_ = native.child_value(7)
|
|
_ = native.imported_read(native.imported_handle()?)
|
|
_ = native.configured_value(9)
|
|
signed i8 :: -2
|
|
unsigned u16 :: 3
|
|
float_value f32 :: 4.0
|
|
c_float_value c_float :: 5.0
|
|
pointer *u8 :: "ok".ptr
|
|
nullable ?*u8 :: pointer
|
|
_ = native.imported_variadic(7, signed, unsigned, float_value, c_float_value, pointer, nullable)
|
|
}
|