update to latest bbolt

with two changes, both not resulting in different behaviour for us.
This commit is contained in:
Mechiel Lukkien
2024-05-09 10:31:34 +02:00
parent 587beb75b1
commit db3e44913c
9 changed files with 41 additions and 33 deletions

12
vendor/go.etcd.io/bbolt/unsafe.go generated vendored
View File

@ -1,7 +1,6 @@
package bbolt
import (
"reflect"
"unsafe"
)
@ -26,14 +25,3 @@ func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
// all), so this is believed to be correct.
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
}
// unsafeSlice modifies the data, len, and cap of a slice variable pointed to by
// the slice parameter. This helper should be used over other direct
// manipulation of reflect.SliceHeader to prevent misuse, namely, converting
// from reflect.SliceHeader to a Go slice type.
func unsafeSlice(slice, data unsafe.Pointer, len int) {
s := (*reflect.SliceHeader)(slice)
s.Data = uintptr(data)
s.Cap = len
s.Len = len
}