mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
all: merge .m files with their .go counterparts
The only reason for separate files is Objective-C callbacks into Go, or when the Go side is common, yet the Objective-C side differs from macOS to iOS. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -8,7 +8,11 @@ package log
|
||||
/*
|
||||
#cgo CFLAGS: -Werror -fmodules -fobjc-arc -x objective-c
|
||||
|
||||
__attribute__ ((visibility ("hidden"))) void nslog(char *str);
|
||||
@import Foundation;
|
||||
|
||||
static void nslog(char *str) {
|
||||
NSLog(@"%@", @(str));
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
// +build darwin,ios
|
||||
|
||||
@import Foundation;
|
||||
|
||||
#include "_cgo_export.h"
|
||||
|
||||
void nslog(char *str) {
|
||||
NSLog(@"%@", @(str));
|
||||
}
|
||||
Reference in New Issue
Block a user