diff --git a/exp/mdbxpool/txnpool.go b/exp/mdbxpool/txnpool.go index d6a9582..0f57afc 100644 --- a/exp/mdbxpool/txnpool.go +++ b/exp/mdbxpool/txnpool.go @@ -6,7 +6,7 @@ import ( "sync" "sync/atomic" - "github.com/torquem-ch/mdbx-go/mdbx" + "github.com/erigontech/mdbx-go/mdbx" ) // UpdateHandling describes how a TxnPool handles existing mdbx.Readonly diff --git a/go.mod b/go.mod index 736dec2..c57a9ef 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/torquem-ch/mdbx-go +module github.com/erigontech/mdbx-go go 1.15 diff --git a/mdbx/mdbx.go b/mdbx/mdbx.go index 5fcce56..55471c8 100644 --- a/mdbx/mdbx.go +++ b/mdbx/mdbx.go @@ -127,8 +127,8 @@ details about dealing with such situations. package mdbx /* -#cgo !windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fPIC -pthread -Wno-error=attributes -W -Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers -#cgo windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fexceptions -fno-common -W -Wno-deprecated-declarations -Wno-bad-function-cast -Wno-cast-function-type -Wall -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers +#cgo !windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fPIC -pthread -Wno-error=attributes -W -Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes +#cgo windows CFLAGS: -O2 -g -DMDBX_BUILD_FLAGS='' -DNDEBUG=1 -std=gnu11 -fvisibility=hidden -ffast-math -fexceptions -fno-common -W -Wno-deprecated-declarations -Wno-bad-function-cast -Wno-cast-function-type -Wall -Wno-format -Wno-format-security -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-unused-function -Wno-format-extra-args -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes #cgo windows LDFLAGS: -lntdll #cgo linux LDFLAGS: -lrt diff --git a/mdbx/val.go b/mdbx/val.go index 40847d4..bbd8239 100644 --- a/mdbx/val.go +++ b/mdbx/val.go @@ -10,7 +10,7 @@ import "C" import ( "unsafe" - "github.com/torquem-ch/mdbx-go/mdbx/mdbxarch" + "github.com/erigontech/mdbx-go/mdbx/mdbxarch" ) // Just for docs: @@ -112,5 +112,8 @@ func wrapVal(b []byte) *C.MDBX_val { } func castToBytes(val *C.MDBX_val) []byte { + if val.iov_len == 0 { + return []byte{} + } return (*[valMaxSize]byte)(val.iov_base)[:val.iov_len:val.iov_len] }