refactor(ffi-linkage): Phase 6.2 — migrate platform/ #foreign→extern/export

Pure source rename across uikit/android/android_jni/sdl3 (~64 #foreign sites):
- 30 fn decls '… #foreign;' → '… extern;'
- 34 import runtime classes '#foreign #objc_class/#jni_class("X") {' →
  '#objc_class/#jni_class("X") extern {' (prefix → postfix modifier)
- 4 defined Sx* obj-c classes '#objc_class("X") {' → '… export {'

Behavior-preserving (AST already unified post-Phase-5.0). Verified byte-identical
IR via 'sx ir' on the uikit importers 1610 + 1606 (which compile uikit incl. the
4 defined Sx* classes on host) and an sdl3 probe; android.sx (host-incompatible,
only compiles under OS==.android) verified by an identical 4-error dedup set (the
keyword-neutral 'foreign symbol already bound' message is unchanged). Empty
snapshot diff; suite green (647 corpus / 444 unit, 0 failed).
This commit is contained in:
agra
2026-06-15 04:32:20 +03:00
parent 32e83c90cc
commit 2cd5d7ba82
4 changed files with 68 additions and 68 deletions

View File

@@ -11,8 +11,8 @@
g_sdl_plat : *SdlPlatform = null;
chdir :: (path: [*]u8) -> i32 #foreign;
SDL_GetBasePath :: () -> [*]u8 #foreign;
chdir :: (path: [*]u8) -> i32 extern;
SDL_GetBasePath :: () -> [*]u8 extern;
// A macOS `.app` launched via Finder / `open` starts with CWD=`/`, so a
// game's CWD-relative asset loads (`read_file_bytes("assets/...")`) miss and