Blame vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go

Packit Service 3a6627
// Copyright 2020 The Go Authors. All rights reserved.
Packit Service 3a6627
// Use of this source code is governed by a BSD-style
Packit Service 3a6627
// license that can be found in the LICENSE file.
Packit Service 3a6627
Packit Service 3a6627
// Package unsafeheader contains header declarations for the Go runtime's
Packit Service 3a6627
// slice and string implementations.
Packit Service 3a6627
//
Packit Service 3a6627
// This package allows x/sys to use types equivalent to
Packit Service 3a6627
// reflect.SliceHeader and reflect.StringHeader without introducing
Packit Service 3a6627
// a dependency on the (relatively heavy) "reflect" package.
Packit Service 3a6627
package unsafeheader
Packit Service 3a6627
Packit Service 3a6627
import (
Packit Service 3a6627
	"unsafe"
Packit Service 3a6627
)
Packit Service 3a6627
Packit Service 3a6627
// Slice is the runtime representation of a slice.
Packit Service 3a6627
// It cannot be used safely or portably and its representation may change in a later release.
Packit Service 3a6627
type Slice struct {
Packit Service 3a6627
	Data unsafe.Pointer
Packit Service 3a6627
	Len  int
Packit Service 3a6627
	Cap  int
Packit Service 3a6627
}
Packit Service 3a6627
Packit Service 3a6627
// String is the runtime representation of a string.
Packit Service 3a6627
// It cannot be used safely or portably and its representation may change in a later release.
Packit Service 3a6627
type String struct {
Packit Service 3a6627
	Data unsafe.Pointer
Packit Service 3a6627
	Len  int
Packit Service 3a6627
}