- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for GoStringN (0.12 sec)
-
src/runtime/linkname.go
//go:linkname _cgo_panic_internal //go:linkname cgoAlwaysFalse //go:linkname cgoUse //go:linkname cgoCheckPointer //go:linkname cgoCheckResult //go:linkname cgoNoCallback //go:linkname gobytes //go:linkname gostringn // used in plugin //go:linkname doInit // used in math/bits //go:linkname overflowError //go:linkname divideError // used in tests //go:linkname extraMInUse //go:linkname blockevent
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 778 bytes - Viewed (0) -
src/cmd/cgo/out.go
func _Cfunc_GoString(p *_Ctype_char) string { return _cgo_runtime_gostring(p) } ` const goStringNDef = ` //go:linkname _cgo_runtime_gostringn runtime.gostringn func _cgo_runtime_gostringn(*_Ctype_char, int) string // GoStringN converts the C data p with explicit length l to a Go string. func _Cfunc_GoStringN(p *_Ctype_char, l _Ctype_int) string { return _cgo_runtime_gostringn(p, int(l)) } `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 16:41:10 UTC 2024 - 59.6K bytes - Viewed (0) -
src/runtime/string.go
// //go:linkname internal_syscall_gostring internal/syscall/unix.gostring func internal_syscall_gostring(p *byte) string { return gostring(p) } func gostringn(p *byte, l int) string { if l == 0 { return "" } s, b := rawstring(l) memmove(unsafe.Pointer(&b[0]), unsafe.Pointer(p), uintptr(l)) return s } const ( maxUint64 = ^uint64(0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/cgo/internal/test/test.go
const greeting = "hello, world" type testPair struct { Name string Got, Want interface{} } var testPairs = []testPair{ {"GoString", C.GoString(C.greeting), greeting}, {"GoStringN", C.GoStringN(C.greeting, 5), greeting[:5]}, {"GoBytes", C.GoBytes(unsafe.Pointer(C.greeting), 5), []byte(greeting[:5])}, } func testHelpers(t *testing.T) { for _, pair := range testPairs {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 48.5K bytes - Viewed (0) -
src/cmd/cgo/doc.go
// if C.free is needed). func C.CBytes([]byte) unsafe.Pointer // C string to Go string func C.GoString(*C.char) string // C data with explicit length to Go string func C.GoStringN(*C.char, C.int) string // C data with explicit length to Go []byte func C.GoBytes(unsafe.Pointer, C.int) []byte As a special case, C.malloc does not call the C library malloc directly
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 17:12:16 UTC 2024 - 42.2K bytes - Viewed (0)