> For example, on the Go side write > type chanToUse struct { > c chan int > }
> //export MyGoFunction > func MyGoFunction(u unsafe.Pointer, val int) { > cu = (*chanToUse)(u) > cu.c <- val > } Why the struct? Couldn't you just pass a pointer to a chan? -- 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/87r1ldi96g.fsf%40pirx.irif.fr.