[go-nuts] Re: Sending C array over gob ; decoding shows wrong data

2017-12-19 Thread 'Bryan Mills' via golang-nuts
Per https://golang.org/pkg/encoding/gob/, “Structs encode and decode only exported fields.” The fields of your C struct are unexported in Go, since they start with lower-case letters. If the gob package is encoding or decoding the non-array fields of the struct, *that* is the bug. On Monday,

[go-nuts] Re: Sending C array over gob ; decoding shows wrong data

2017-12-18 Thread Tamás Gulácsi
Use a Go struct for GOB encoding/decoding. 2017. december 18., hétfő 13:51:26 UTC+1 időpontban Kanika Kakkar a következőt írta: > > I am sending a C structure which looks like this > > typdef struct > { > unsigned char field1; > unsigned char field2; > unsigned char array[10]; > }complete_dat