- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for slicedata2 (0.6 sec)
-
src/unsafe/unsafe.go
func Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType // SliceData returns a pointer to the underlying array of the argument // slice. // - If cap(slice) > 0, SliceData returns &slice[:1][0]. // - If slice == nil, SliceData returns nil. // - Otherwise, SliceData returns a non-nil pointer to an // unspecified memory address. func SliceData(slice []ArbitraryType) *ArbitraryType
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 19:45:20 UTC 2024 - 12.1K bytes - Viewed (0) -
src/internal/types/testdata/check/builtins0.go
var _ []int = unsafe.Slice(&x, 0) _ = unsafe.Slice(&x, 1.0) _ = unsafe.Slice((*int)(nil), 0) } func SliceData1() { var s []int unsafe.SliceData(0 /* ERROR "not a slice" */) unsafe /* ERROR "not used" */ .SliceData(s) type S []int _ = unsafe.SliceData(s) _ = unsafe.SliceData(S{}) } func String1() { var b byte unsafe.String() // ERROR "not enough arguments"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/builtins.go
x.mode = value x.typ = NewSlice(ptr.base) if check.recordTypes() { check.recordBuiltinType(call.Fun, makeSig(x.typ, ptr, y.typ)) } case _SliceData: // unsafe.SliceData(slice []T) *T check.verifyVersionf(call.Fun, go1_20, "unsafe.SliceData") slice, _ := coreType(x.typ).(*Slice) if slice == nil { check.errorf(x, InvalidUnsafeSliceData, invalidArg+"%s is not a slice", x) return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.1K bytes - Viewed (0) -
src/go/types/builtins.go
x.mode = value x.typ = NewSlice(ptr.base) if check.recordTypes() { check.recordBuiltinType(call.Fun, makeSig(x.typ, ptr, y.typ)) } case _SliceData: // unsafe.SliceData(slice []T) *T check.verifyVersionf(call.Fun, go1_20, "unsafe.SliceData") slice, _ := coreType(x.typ).(*Slice) if slice == nil { check.errorf(x, InvalidUnsafeSliceData, invalidArg+"%s is not a slice", x) return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.2K bytes - Viewed (0) -
src/log/slog/value.go
as2 := make([]Attr, 0, len(as)-n) for _, a := range as { if !a.Value.isEmptyGroup() { as2 = append(as2, a) } } as = as2 } return Value{num: uint64(len(as)), any: groupptr(unsafe.SliceData(as))} } // countEmptyGroups returns the number of empty group values in its argument. func countEmptyGroups(as []Attr) int { n := 0 for _, a := range as { if a.Value.isEmptyGroup() { n++ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:12:08 UTC 2024 - 13.3K bytes - Viewed (0) -
src/syscall/fs_wasip1.go
) return errnoErr(errno) } func Fsync(fd int) error { errno := fd_sync(int32(fd)) return errnoErr(errno) } func bytesPointer(b []byte) unsafe.Pointer { return unsafe.Pointer(unsafe.SliceData(b)) } func stringPointer(s string) unsafe.Pointer { return unsafe.Pointer(unsafe.StringData(s)) } func makeIOVec(b []byte) unsafe.Pointer { return unsafe.Pointer(&iovec{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 24.1K bytes - Viewed (0) -
src/cmd/go/internal/modindex/read.go
for i := range ret { ret[i] = build.Directive{Text: r.string(), Pos: r.tokpos()} } return ret } func asString(b []byte) string { return unsafe.String(unsafe.SliceData(b), len(b)) } // A decoder helps decode the index format. type decoder struct { data []byte // data after header str []byte // string table }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 29.7K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
*ast.MapType, *ast.ChanType: return true } return false } // isUnsafeData reports whether the expression is unsafe.StringData // or unsafe.SliceData. We can ignore these when checking for pointers // because they don't change whether or not their argument contains // any Go pointers. If onlyStringData is true we only check for StringData.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0) -
doc/go_spec.html
<p> The following built-in functions are not permitted in statement context: </p> <pre> append cap complex imag len make new real unsafe.Add unsafe.Alignof unsafe.Offsetof unsafe.Sizeof unsafe.Slice unsafe.SliceData unsafe.String unsafe.StringData </pre> <pre> h(x+y) f.Close() <-ch (<-ch) len("foo") // illegal if len is the built-in function </pre>
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 21:07:21 UTC 2024 - 281.5K bytes - Viewed (1) -
src/reflect/value.go
// it references will not be garbage collected, so programs must keep // a separate, correctly typed pointer to the underlying data. // // Deprecated: Use unsafe.Slice or unsafe.SliceData instead. type SliceHeader struct { Data uintptr Len int Cap int } func typesMustMatch(what string, t1, t2 Type) { if t1 != t2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0)