- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for sliceData (0.17 sec)
-
src/cmd/compile/internal/staticdata/embed.go
} case embedFiles: slicedata := v.Sym().Pkg.Lookup(v.Sym().Name + `.files`).Linksym() off := 0 // []files pointed at by Files off = objw.SymPtr(slicedata, off, slicedata, 3*types.PtrSize) // []file, pointing just past slice off = objw.Uintptr(slicedata, off, uint64(len(files))) off = objw.Uintptr(slicedata, off, uint64(len(files))) // embed/embed.go type file is:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 10 18:22:02 UTC 2023 - 4.8K bytes - Viewed (0) -
test/unsafe_slice_data.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 17:15:15 UTC 2022 - 481 bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue64406.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 29 20:34:33 UTC 2023 - 403 bytes - Viewed (0) -
pkg/proxy/endpointslicecache.go
} change := &endpointsChange{} change.previous = cache.getEndpointsMap(serviceNN, esTracker.applied) for name, sliceData := range esTracker.pending { if sliceData.remove { delete(esTracker.applied, name) } else { esTracker.applied[name] = sliceData } delete(esTracker.pending, name) } change.current = cache.getEndpointsMap(serviceNN, esTracker.applied)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 21:07:21 UTC 2024 - 11.7K bytes - Viewed (1) -
src/internal/syscall/unix/arc4random_darwin.go
func ARC4Random(p []byte) { // macOS 11 and 12 abort if length is 0. if len(p) == 0 { return } syscall_syscall(abi.FuncPCABI0(libc_arc4random_buf_trampoline), uintptr(unsafe.Pointer(unsafe.SliceData(p))), uintptr(len(p)), 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 20:02:21 UTC 2024 - 633 bytes - Viewed (0) -
test/unsafebuiltins.go
} // unsafe.StringData { var s = "string" assert(string(unsafe.Slice(unsafe.StringData(s), len(s))) == s) } //unsafe.SliceData { var s = []byte("slice") assert(unsafe.String(unsafe.SliceData(s), len(s)) == string(s)) } } func assert(ok bool) { if !ok { panic("FAIL") } } func mustPanic(f func()) { defer func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 17:15:15 UTC 2022 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes/cache.go
func toString(b []byte) string { // unsafe.SliceData relies on cap whereas we want to rely on len if len(b) == 0 { return "" } // Copied from go 1.20.1 strings.Builder.String // https://github.com/golang/go/blob/202a1a57064127c3f19d96df57b9f9586145e21c/src/strings/builder.go#L48 return unsafe.String(unsafe.SliceData(b), len(b))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 21 19:25:52 UTC 2023 - 2.6K bytes - Viewed (0) -
test/fixedbugs/issue59293.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "unsafe" //go:noinline func f(x []byte) bool { return unsafe.SliceData(x) != nil } //go:noinline func g(x string) bool { return unsafe.StringData(x) != nil } func main() { if f(nil) { panic("bad f") } if g("") { panic("bad g") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 28 19:55:43 UTC 2023 - 433 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/cache.go
func toString(b []byte) string { // unsafe.SliceData relies on cap whereas we want to rely on len if len(b) == 0 { return "" } // Copied from go 1.20.1 strings.Builder.String // https://github.com/golang/go/blob/202a1a57064127c3f19d96df57b9f9586145e21c/src/strings/builder.go#L48 return unsafe.String(unsafe.SliceData(b), len(b))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 31 20:26:58 UTC 2023 - 3.5K bytes - Viewed (0) -
src/go/types/builtins_test.go
{"Slice", `type B *byte; var b B; _ = unsafe.Slice(b, 0)`, `func(*byte, int) []byte`}, {"SliceData", "var s []int; _ = unsafe.SliceData(s)", `func([]int) *int`}, {"SliceData", "type S []int; var s S; _ = unsafe.SliceData(s)", `func([]int) *int`}, {"String", `var p *byte; _ = unsafe.String(p, 1)`, `func(*byte, int) string`},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 10.9K bytes - Viewed (0)