Hi, I have the following struct in C ====================== struct DataStruct { const char *name; const void *data; int type; int arraylength; size_t count; int flags; }; ======================
I am trying to pass a string/(char *) to data. What is the correct approach ? I believe the other parameters are being passed successfully My attempt ====================== var params [2]C.struct_DataStruct params[0].name = C.CString("type") // cstr := C.CString("apistream") // params[0].data = unsafe.Pointer(&cstr) params[0]._type = C.int(0) params[0].arraylength = C.int(0) params[0].flags = C.int(0) ====================== Cheers -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f70be5ec-e1dd-44b3-a9a8-40ad39afc398n%40googlegroups.com.