[go-nuts] Re: How to point to pointer struct

2017-05-23 Thread alex martin
Thank you problem solved with your suggestion. var PSlv (**C.Volume) = RPointer.v lenght := int(RPointer.h.nvolumes) sliceV := (*[1 << 30](*C.Volume))(unsafe.Pointer(PSlv))[:lenght:lenght] the result is []*C.Volume correct, where the pointer is null the slice value is nil Alex On Tuesday, May

[go-nuts] Re: How to point to pointer struct

2017-05-23 Thread Pablo Rozas Larraondo
I'm thinking about the possibility of having something like [][]Volume in Go. Do you know the size or number of Volumes in your struct? There's an example of converting **char into []string that might be useful: https://stackoverflow.com/questions/36188649/cgo-char-to-slice-string On Tuesday,