refactor(ffi-linkage): Phase 7.3 — migrate 14xx ffi-jni examples #foreign→extern

13 JNI examples migrated (1410-1419/1423/1424/1425): import runtime classes
'#foreign #jni_class("X") {' → '#jni_class("X") extern {'. 1417 (all-runtimes)
also exercises #jni_interface/#objc_class/#objc_protocol/#swift_class/#swift_struct/
#swift_protocol — all take the postfix modifier (verified by probe), migrated via a
generalized '#foreign #<directive>("X") {' → '… extern {' rewrite. No 14xx snapshot
asserts on 'foreign'; empty snapshot diff, corpus-validated.

KEPT comment-only #foreign in 1426 (jni-extern-class test, no decls). Suite green
(647 corpus / 444 unit, 0 failed).
This commit is contained in:
agra
2026-06-15 07:00:32 +03:00
parent a68f7c2e64
commit 2888f6fc00
13 changed files with 23 additions and 23 deletions

View File

@@ -17,27 +17,27 @@
#import "modules/std.sx";
IFoo :: #foreign #jni_interface("com/example/IFoo") {
IFoo :: #jni_interface("com/example/IFoo") extern {
bar :: (self: *Self) -> i32;
}
NSString :: #foreign #objc_class("NSString") {
NSString :: #objc_class("NSString") extern {
length :: (self: *Self) -> i32;
}
NSCopying :: #foreign #objc_protocol("NSCopying") {
NSCopying :: #objc_protocol("NSCopying") extern {
copy :: (self: *Self) -> *Self;
}
URL :: #foreign #swift_class("Foundation.URL") {
URL :: #swift_class("Foundation.URL") extern {
absoluteString :: (self: *Self) -> *void;
}
Date :: #foreign #swift_struct("Foundation.Date") {
Date :: #swift_struct("Foundation.Date") extern {
timeIntervalSince1970 :: (self: *Self) -> f64;
}
Hashable :: #foreign #swift_protocol("Swift.Hashable") {
Hashable :: #swift_protocol("Swift.Hashable") extern {
hash :: (self: *Self) -> i32;
}