From 925adc0782c4dd9b978a712b1b5645b5f31bf802 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 12 Aug 2018 11:07:33 -0400 Subject: Fixed build errors. --- button.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'button.go') diff --git a/button.go b/button.go index a0c4e67..630c684 100644 --- a/button.go +++ b/button.go @@ -8,6 +8,8 @@ import ( // #include "ui.h" // extern void doButtonOnClicked(uiButton *, void *); +// // see golang/go#19835 +// typedef void (*buttonCallback)(uiButton *, void *); import "C" // Button is a Control that represents a button that the user can @@ -27,7 +29,7 @@ func NewButton(text string) *Button { b.b = C.uiNewButton(ctext) freestr(ctext) - C.uiButtonOnClicked(b.b, C.doButtonOnClicked, nil) + C.uiButtonOnClicked(b.b, C.buttonCallback(C.doButtonOnClicked), nil) b.ControlBase = NewControlBase(b, uintptr(unsafe.Pointer(b.b))) return b -- cgit v1.2.3