iOS lock step keyboard + metal
This commit is contained in:
14
examples/94-foreign-global.sx
Normal file
14
examples/94-foreign-global.sx
Normal file
@@ -0,0 +1,14 @@
|
||||
// Extern data globals via `<name> : <type> #foreign;`. Lets sx code
|
||||
// reference libSystem / framework symbols (NSConcreteStackBlock,
|
||||
// __stdinp, etc.) for FFI bridges. Mirrors the long-standing
|
||||
// `<fn> :: (...) -> ... #foreign;` form on the function side.
|
||||
|
||||
#import "modules/std.sx";
|
||||
|
||||
__stdinp : *void #foreign;
|
||||
|
||||
main :: () -> s32 {
|
||||
addr_bits : u64 = xx @__stdinp;
|
||||
print("stdin extern global non-null: {}\n", addr_bits != 0);
|
||||
0;
|
||||
}
|
||||
Reference in New Issue
Block a user