MCPcopy
hub / github.com/etcd-io/bbolt / UnsafeIndex

Function UnsafeIndex

internal/common/unsafe.go:11–13  ·  view source on GitHub ↗
(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int)

Source from the content-addressed store, hash-verified

9}
10
11func UnsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
12 return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
13}
14
15func UnsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
16 // See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices

Callers 3

LeafPageElementMethod · 0.85
BranchPageElementMethod · 0.85
FreelistPageIdsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected