I was going by the example at the bottom of the OP. Use whatever type is expected by the C API, of course.
> On Oct 31, 2016, at 4:41 PM, Florian Weimer <f...@deneb.enyo.de> wrote: > > * Pietro Gagliardi: > >> Just pass the null-terminated string and use C.int(len(goString)) as >> the length. The length of a Go string is already in bytes and does not >> include the terminating null (since Go has none), and I assume >> C.CString() produces the same byte sequence without encoding >> conversions. > > Is C.int really the right type here? > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.