From 4c310187b751607f6d5857f0a745529830339cc5 Mon Sep 17 00:00:00 2001 From: Greg Pomerantz Date: Wed, 14 Jul 2021 22:22:20 -0400 Subject: [PATCH] Updates for Big Sur. --- go.mod | 3 +++ ns/pasteboard.go | 2 +- nswrap.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3f87823 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.wow.st/gmp/clip + +go 1.16 diff --git a/ns/pasteboard.go b/ns/pasteboard.go index 7eca07a..30fb64f 100644 --- a/ns/pasteboard.go +++ b/ns/pasteboard.go @@ -191,7 +191,7 @@ func (o *NSPasteboard) ClearContents() { func (o *NSPasteboard) SetString(s string) bool { string := NSStringWithGoString(s) - ret := (C.NSPasteboard_inst_SetString(o.Ptr(), string.Ptr())) != 0 + ret := (C.NSPasteboard_inst_SetString(o.Ptr(), string.Ptr())) != false runtime.KeepAlive(o) runtime.KeepAlive(string) return ret diff --git a/nswrap.yaml b/nswrap.yaml index 67b1eee..f44b40d 100644 --- a/nswrap.yaml +++ b/nswrap.yaml @@ -1,7 +1,7 @@ # binding generator for git.wow.st/gmp/nswrap # original binding is in ns/main.go- and is not used. inputfiles: - - /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h + - /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h classes: - NSPasteboard - NSString