cubefs

Форк
0
30 строк · 913.0 Байт
1
// Copyright 2020 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4

5
// Package unsafeheader contains header declarations for the Go runtime's
6
// slice and string implementations.
7
//
8
// This package allows x/sys to use types equivalent to
9
// reflect.SliceHeader and reflect.StringHeader without introducing
10
// a dependency on the (relatively heavy) "reflect" package.
11
package unsafeheader
12

13
import (
14
	"unsafe"
15
)
16

17
// Slice is the runtime representation of a slice.
18
// It cannot be used safely or portably and its representation may change in a later release.
19
type Slice struct {
20
	Data unsafe.Pointer
21
	Len  int
22
	Cap  int
23
}
24

25
// String is the runtime representation of a string.
26
// It cannot be used safely or portably and its representation may change in a later release.
27
type String struct {
28
	Data unsafe.Pointer
29
	Len  int
30
}
31

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.