objc: remove ns_string/c_string helpers
ns_string's only caller was impl Into(*NSString) for string, so +stringWithUTF8String: is inlined there. c_string's one use (NSBundle.resourcePath in uikit) becomes rsrc.UTF8String() with resourcePath retyped *NSString. ffi-objc-call-06 and ffi-objc-dsl-07 .ir snapshots regenerated — they only drop the now-absent extern declares.
This commit is contained in:
@@ -99,7 +99,7 @@ NSNotification :: #foreign #objc_class("NSNotification") {
|
||||
NSBundle :: #foreign #objc_class("NSBundle") {
|
||||
#extends NSObject;
|
||||
mainBundle :: () -> *NSBundle;
|
||||
resourcePath :: (self: *Self) -> *void;
|
||||
resourcePath :: (self: *Self) -> *NSString;
|
||||
}
|
||||
|
||||
NSNotificationCenter :: #foreign #objc_class("NSNotificationCenter") {
|
||||
@@ -810,7 +810,7 @@ uikit_chdir_to_bundle :: () {
|
||||
bundle := NSBundle.mainBundle();
|
||||
rsrc := bundle.resourcePath();
|
||||
if rsrc == null { return; }
|
||||
chdir(c_string(rsrc));
|
||||
chdir(rsrc.UTF8String());
|
||||
}
|
||||
|
||||
// ── SxGLView class ─────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user