[go-nuts] [cgo] go strings and go pointers

2016-07-26 Thread Tamás Gulácsi
You have to allocate ön the C side if you pass it to C, esp. pointers. -- 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. F

[go-nuts] [cgo] go strings and go pointers

2016-07-26 Thread Miłosz Pigłas
Hello everyone, I'm experimenting with extension for sqlite written in Go. This is simple function exported to shared library, which produces string from recived arguments. If such function returns value (which is result of concatenation of strings that were created in C code) as GO string, pro