diff options
| author | Pietro Gagliardi <[email protected]> | 2018-08-26 13:18:53 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2018-08-26 13:18:53 -0400 |
| commit | 809662459dcd2cbe0b42f338413b88fea0483086 (patch) | |
| tree | fe2b74245658f886d800b2c108961c345186acea | |
| parent | 766f9ed028c757561b99e4ed5aa487d381fe80a3 (diff) | |
Migrate the link_darwin_amd64.go and control.go files back; fixed up errors in the C files and util.go.
| -rw-r--r-- | control.go (renamed from BBB_GOFILES/control.go) | 2 | ||||
| -rw-r--r-- | link_darwin_amd64.go (renamed from BBB_GOFILES/link_darwin_amd64.go) | 0 | ||||
| -rw-r--r-- | pkgui.c | 2 | ||||
| -rw-r--r-- | pkgui.h | 2 | ||||
| -rw-r--r-- | util.go | 1 |
5 files changed, 4 insertions, 3 deletions
diff --git a/BBB_GOFILES/control.go b/control.go index 23a8ddf..ab8673c 100644 --- a/BBB_GOFILES/control.go +++ b/control.go @@ -6,7 +6,7 @@ import ( "unsafe" ) -// #include "ui.h" +// #include "pkgui.h" import "C" // no need to lock this; only the GUI thread can access it diff --git a/BBB_GOFILES/link_darwin_amd64.go b/link_darwin_amd64.go index ef9c2e5..ef9c2e5 100644 --- a/BBB_GOFILES/link_darwin_amd64.go +++ b/link_darwin_amd64.go @@ -1,6 +1,6 @@ // 26 august 2018 #include "pkgui.h" -#include "xxxxx" +#include "_cgo_export.h" uiInitOptions *pkguiAllocInitOptions(void) { @@ -1,5 +1,5 @@ // 12 august 2018 -#include <stdio.h> +#include <stdlib.h> #include "ui.h" // main.go @@ -12,6 +12,7 @@ import "C" //export pkguiAlloc func pkguiAlloc(n C.size_t) unsafe.Pointer { // cgo turns C.malloc() into a panic-on-OOM version; use it + // TODO make sure it zero-initializes too return C.malloc(n) } |
