aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ClickHouse/ch-go/proto/slice_unsafe.go
blob: 7d9e90ee73b0b5a48ea895c73aa903311a297ac9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//go:build (amd64 || arm64 || riscv64) && !purego

package proto

import "unsafe"

// slice represents slice header.
//
// Used in optimizations when we can interpret [N]T as [M]byte, where
// M = sizeof(T) * N.
//
// NB: careful with endianness!
type slice struct {
	Data unsafe.Pointer
	Len  uintptr
	Cap  uintptr
}