From 47edd5ee2ec8734cde2759225fe8c4d6b2399153 Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 4 Jun 2018 18:07:32 +0000 Subject: [PATCH] Fix pointer cast which breaks in recent versions of Go. --- group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group.go b/group.go index 1796799..ba1c75a 100644 --- a/group.go +++ b/group.go @@ -69,13 +69,13 @@ func callbackConferenceMessageWrapperForC(m *C.Tox, a0 C.uint32_t, a1 C.uint32_t if int(mtype) == MESSAGE_TYPE_NORMAL { for cbfni, ud := range this.cb_conference_messages { cbfn := *(*cb_conference_message_ftype)(cbfni) - message := C.GoStringN((*C.char)((*C.int8_t)(a2)), C.int(a3)) + message := C.GoStringN((*C.char)(unsafe.Pointer(a2)), C.int(a3)) this.putcbevts(func() { cbfn(this, uint32(a0), uint32(a1), message, ud) }) } } else { for cbfni, ud := range this.cb_conference_actions { cbfn := *(*cb_conference_action_ftype)(cbfni) - message := C.GoStringN((*C.char)((*C.int8_t)(a2)), C.int(a3)) + message := C.GoStringN((*C.char)(unsafe.Pointer(a2)), C.int(a3)) this.putcbevts(func() { cbfn(this, uint32(a0), uint32(a1), message, ud) }) } }