| ... | ... | @@ -23,8 +23,7 @@ export fn sub(a: i8, b: i8) i8 { |
| 23 | 23 | // dynamically. The quoted identifier after the extern keyword specifies |
| 24 | 24 | // the library that has the function. (e.g. "c" -> libc.so) |
| 25 | 25 | // The callconv specifier changes the calling convention of the function. |
| 26 | | const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C; |
| 27 | | extern "kernel32" fn ExitProcess(exit_code: u32) callconv(WINAPI) noreturn; |
| 26 | extern "kernel32" fn ExitProcess(exit_code: u32) callconv(.winapi) noreturn; |
| 28 | 27 | extern "c" fn atan2(a: f64, b: f64) f64; |
| 29 | 28 | |
| 30 | 29 | // The @branchHint builtin can be used to tell the optimizer that a function is rarely called ("cold"). |