From 317ddb72830e11a361d3ca04647b98090b799fd5 Mon Sep 17 00:00:00 2001 From: Mura Li Date: Wed, 24 Oct 2018 16:18:51 +0800 Subject: [PATCH] Update vendor/github.com/mattn/go-sqlite3 (#5162) To fix build failure on Windows/386 --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- .../github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 21d5c98e5..82df42154 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -566,11 +566,11 @@ version = "v1.46.1" [[projects]] - digest = "1:9996f2363985103284c59b3d0ca5be58deb1b0db22144bb2fcfa0b4e16f0e61b" + digest = "1:c9724c929d27a14475a45b17a267dbc60671c0bc2c5c05ed21f011f7b5bc9fb5" name = "github.com/mattn/go-sqlite3" packages = ["."] pruneopts = "NUT" - revision = "f3aa5ce89995fab8c7777f7821f689d9ac81c80f" + revision = "c7c4067b79cc51e6dfdcef5c702e74b1e0fa7c75" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index e491eff8b..08a90a308 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -41,7 +41,7 @@ ignored = ["google.golang.org/appengine*"] [[override]] name = "github.com/mattn/go-sqlite3" - revision = "f3aa5ce89995fab8c7777f7821f689d9ac81c80f" + revision = "c7c4067b79cc51e6dfdcef5c702e74b1e0fa7c75" [[override]] name = "github.com/gorilla/mux" diff --git a/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go b/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go index ee2943931..5dde027d0 100644 --- a/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +++ b/vendor/github.com/mattn/go-sqlite3/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((*C.uint)(nil))]*[1]uint)(argv))[i]) arg := *parg h := arg[0] c := unt.get(h)