Migrate the link_darwin_amd64.go and control.go files back; fixed up errors in the C files and util.go.
This commit is contained in:
parent
766f9ed028
commit
809662459d
|
@ -6,7 +6,7 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// #include "ui.h"
|
// #include "pkgui.h"
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
// no need to lock this; only the GUI thread can access it
|
// no need to lock this; only the GUI thread can access it
|
2
pkgui.c
2
pkgui.c
|
@ -1,6 +1,6 @@
|
||||||
// 26 august 2018
|
// 26 august 2018
|
||||||
#include "pkgui.h"
|
#include "pkgui.h"
|
||||||
#include "xxxxx"
|
#include "_cgo_export.h"
|
||||||
|
|
||||||
uiInitOptions *pkguiAllocInitOptions(void)
|
uiInitOptions *pkguiAllocInitOptions(void)
|
||||||
{
|
{
|
||||||
|
|
2
pkgui.h
2
pkgui.h
|
@ -1,5 +1,5 @@
|
||||||
// 12 august 2018
|
// 12 august 2018
|
||||||
#include <stdio.h>
|
#include <stdlib.h>
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
|
|
||||||
// main.go
|
// main.go
|
||||||
|
|
1
util.go
1
util.go
|
@ -12,6 +12,7 @@ import "C"
|
||||||
//export pkguiAlloc
|
//export pkguiAlloc
|
||||||
func pkguiAlloc(n C.size_t) unsafe.Pointer {
|
func pkguiAlloc(n C.size_t) unsafe.Pointer {
|
||||||
// cgo turns C.malloc() into a panic-on-OOM version; use it
|
// cgo turns C.malloc() into a panic-on-OOM version; use it
|
||||||
|
// TODO make sure it zero-initializes too
|
||||||
return C.malloc(n)
|
return C.malloc(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue