- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for passstringslice (0.09 sec)
-
src/cmd/cgo/internal/testerrors/ptr_test.go
body: `s := "a"; r := C.f23(*(*C.gostring23)(unsafe.Pointer(&s))); if *(*string)(unsafe.Pointer(&r)) != s { panic(r) }`, }, { // Passing a slice of Go strings fails. name: "passstringslice", c: `void f24(void *p) {}`, imports: []string{"strings", "unsafe"}, support: `type S24 struct { a [1]string }`, body: `s := S24{a:[1]string{strings.Repeat("a", 2)}}; C.f24(unsafe.Pointer(&s.a[0]))`,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 16:07:49 UTC 2023 - 21.2K bytes - Viewed (0)