// `callconv(.c)` on function pointers passed to foreign callbacks — ensures // the function uses C ABI so it can be safely invoked from `#foreign` // functions like SDL_AddEventWatch. #import "modules/std.sx"; // A function with C calling convention add_c :: (a: s64, b: s64) -> s64 callconv(.c) { a + b; } main :: () { // Call it directly — should work like any other function result := add_c(10, 32); print("callconv(.c): {}\n", result); }