diff options
author | mattn <mattn.jp@gmail.com> | 2018-10-24 10:09:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 10:09:38 +0900 |
commit | 276457a170dc752d264ffe0fae47e4f298c364eb (patch) | |
tree | 239f1948e41bb4009f4b2f6b53ce11c330082599 /sqlite3_opt_unlock_notify.go | |
parent | Merge pull request #439 from typeless/add-unlock-notify (diff) | |
parent | Fix build failure on Windows/386 (diff) | |
download | golite-276457a170dc752d264ffe0fae47e4f298c364eb.tar.gz golite-276457a170dc752d264ffe0fae47e4f298c364eb.tar.xz |
Merge pull request #654 from typeless/fix-too-large-arrary-error
Fix build failure on Windows/386
Diffstat (limited to 'sqlite3_opt_unlock_notify.go')
-rw-r--r-- | sqlite3_opt_unlock_notify.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlite3_opt_unlock_notify.go b/sqlite3_opt_unlock_notify.go index ee29439..e2fcefc 100644 --- a/sqlite3_opt_unlock_notify.go +++ b/sqlite3_opt_unlock_notify.go @@ -19,6 +19,7 @@ extern void unlock_notify_callback(void *arg, int argc); import "C" import ( "fmt" + "math" "sync" "unsafe" ) @@ -59,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 := ((*(*[1 << 30]*[1]uint)(argv))[i]) + parg := ((*(*[(math.MaxInt32 - 1) / unsafe.Sizeof(uintptr)]*[1]uint)(argv))[i]) arg := *parg h := arg[0] c := unt.get(h) |