func main() { t := T{a: 1, b: 2} x := X{t: &t} C.fn(unsafe.Pointer(&t)) C.fn(unsafe.Pointer(&x)) }
func main() { t := T{a: 1, b: 2} C.fn(unsafe.Pointer(&t)) // correct // HL x := X{t: &t} C.fn(unsafe.Pointer(&x)) // incorrect // HL }