You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
548 B
Objective-C
23 lines
548 B
Objective-C
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
@import Dispatch;
|
|
@import Foundation;
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
void gio_wakeupMainThread(void) {
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
gio_dispatchMainFuncs();
|
|
});
|
|
}
|
|
|
|
NSUInteger gio_nsstringLength(CFTypeRef cstr) {
|
|
NSString *str = (__bridge NSString *)cstr;
|
|
return [str length];
|
|
}
|
|
|
|
void gio_nsstringGetCharacters(CFTypeRef cstr, unichar *chars, NSUInteger loc, NSUInteger length) {
|
|
NSString *str = (__bridge NSString *)cstr;
|
|
[str getCharacters:chars range:NSMakeRange(loc, length)];
|
|
}
|