refactor(ffi-linkage): Phase 6.4 — migrate ffi/ #foreign→extern

Pure source rename across objc/objc_block/raylib/sdl3/wasm (~51 sites): fn-decl
markers (bare / 'objc' LIB ref) → 'extern …', and objc.sx's 2 import runtime
classes '#foreign #objc_class("X") {' → '#objc_class("X") extern {'. No bare
defined classes. Behavior-preserving. objc + objc_block validated directly by the
50 marked 13xx corpus examples (incl. import classes 1300/1301 + defined classes
1339/1349); raylib/ffi-sdl3/wasm (no marked importers on host) verified by
byte-identical 'sx ir' probes pre/post. Empty snapshot diff; suite green (647
corpus / 444 unit, 0 failed).
This commit is contained in:
agra
2026-06-15 04:45:55 +03:00
parent 48a8769d19
commit 666a2e20e1
5 changed files with 51 additions and 51 deletions

View File

@@ -320,27 +320,27 @@ SDL_Event :: enum struct { tag: u32; _: u32; payload: [30]u32; } {
}
// Functions
SDL_Init :: (flags: u32) -> bool #foreign;
SDL_Quit :: () -> void #foreign;
SDL_CreateWindow :: (title: [:0]u8, w: i32, h: i32, flags: u64) -> *void #foreign;
SDL_DestroyWindow :: (window: *void) -> void #foreign;
SDL_GL_SetAttribute :: (attr: i32, value: i32) -> bool #foreign;
SDL_GL_CreateContext :: (window: *void) -> *void #foreign;
SDL_GL_DestroyContext :: (context: *void) -> bool #foreign;
SDL_GL_MakeCurrent :: (window: *void, context: *void) -> bool #foreign;
SDL_GL_SwapWindow :: (window: *void) -> bool #foreign;
SDL_GL_SetSwapInterval :: (interval: i32) -> bool #foreign;
SDL_GL_GetProcAddress :: (proc: [:0]u8) -> *void #foreign;
SDL_PollEvent :: (event: *SDL_Event) -> bool #foreign;
SDL_AddEventWatch :: (filter: *void, userdata: *void) -> bool #foreign;
SDL_GetTicks :: () -> u64 #foreign;
SDL_GetPerformanceCounter :: () -> u64 #foreign;
SDL_GetPerformanceFrequency :: () -> u64 #foreign;
SDL_Delay :: (ms: u32) -> void #foreign;
SDL_GetWindowDisplayScale :: (window: *void) -> f32 #foreign;
SDL_GetWindowSize :: (window: *void, w: *i32, h: *i32) -> bool #foreign;
SDL_SetWindowSize :: (window: *void, w: i32, h: i32) -> bool #foreign;
SDL_GetWindowSizeInPixels :: (window: *void, w: *i32, h: *i32) -> bool #foreign;
SDL_Init :: (flags: u32) -> bool extern;
SDL_Quit :: () -> void extern;
SDL_CreateWindow :: (title: [:0]u8, w: i32, h: i32, flags: u64) -> *void extern;
SDL_DestroyWindow :: (window: *void) -> void extern;
SDL_GL_SetAttribute :: (attr: i32, value: i32) -> bool extern;
SDL_GL_CreateContext :: (window: *void) -> *void extern;
SDL_GL_DestroyContext :: (context: *void) -> bool extern;
SDL_GL_MakeCurrent :: (window: *void, context: *void) -> bool extern;
SDL_GL_SwapWindow :: (window: *void) -> bool extern;
SDL_GL_SetSwapInterval :: (interval: i32) -> bool extern;
SDL_GL_GetProcAddress :: (proc: [:0]u8) -> *void extern;
SDL_PollEvent :: (event: *SDL_Event) -> bool extern;
SDL_AddEventWatch :: (filter: *void, userdata: *void) -> bool extern;
SDL_GetTicks :: () -> u64 extern;
SDL_GetPerformanceCounter :: () -> u64 extern;
SDL_GetPerformanceFrequency :: () -> u64 extern;
SDL_Delay :: (ms: u32) -> void extern;
SDL_GetWindowDisplayScale :: (window: *void) -> f32 extern;
SDL_GetWindowSize :: (window: *void, w: *i32, h: *i32) -> bool extern;
SDL_SetWindowSize :: (window: *void, w: i32, h: i32) -> bool extern;
SDL_GetWindowSizeInPixels :: (window: *void, w: *i32, h: *i32) -> bool extern;
SDL_Rect :: struct {
x: i32;
@@ -349,5 +349,5 @@ SDL_Rect :: struct {
h: i32;
}
SDL_GetPrimaryDisplay :: () -> u32 #foreign;
SDL_GetDisplayUsableBounds :: (display_id: u32, rect: *SDL_Rect) -> bool #foreign;
SDL_GetPrimaryDisplay :: () -> u32 extern;
SDL_GetDisplayUsableBounds :: (display_id: u32, rect: *SDL_Rect) -> bool extern;