From 576a2cb9f58007a10803dca9b0bacc03ebcff467 Mon Sep 17 00:00:00 2001 From: Mura Li Date: Wed, 24 Oct 2018 09:52:51 +0800 Subject: [PATCH] Fix build failure of incorrect expression for unsafe.Sizeof --- sqlite3_opt_unlock_notify.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlite3_opt_unlock_notify.go b/sqlite3_opt_unlock_notify.go index e2fcefc..5dde027 100644 --- a/sqlite3_opt_unlock_notify.go +++ b/sqlite3_opt_unlock_notify.go @@ -60,7 +60,7 @@ func (t *unlock_notify_table) get(h uint) chan struct{} { //export unlock_notify_callback func unlock_notify_callback(argv unsafe.Pointer, argc C.int) { for i := 0; i < int(argc); i++ { - parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof(uintptr)]*[1]uint)(argv))[i]) + parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.uint)(nil))]*[1]uint)(argv))[i]) arg := *parg h := arg[0] c := unt.get(h)