1
0
mirror of https://github.com/fumiama/go-base16384.git synced 2026-06-19 10:26:33 +08:00

放弃 cgo

This commit is contained in:
fumiama
2021-10-28 14:02:36 +08:00
parent e989e44588
commit b764251f95
9 changed files with 257 additions and 69 deletions

15
slice.go Normal file
View File

@@ -0,0 +1,15 @@
package base14
import "unsafe"
// slice is the runtime representation of a slice.
// It cannot be used safely or portably and its representation may
// change in a later release.
//
// Unlike reflect.SliceHeader, its Data field is sufficient to guarantee the
// data it references will not be garbage collected.
type slice struct {
Data unsafe.Pointer
Len int
Cap int
}