Closed dimaxgl closed 8 years ago
Ah, I feared this might be the case.
Currently, we use a somewhat "hacky" solution for having PHP write back to the Go context. We do so by instantiating a context.Context
, then passing and storing the unsafe.Pointer
down in the C context. When PHP wants to e.g. write something back to the user, we call an exported Go function and pass the context pointer, which is then used for writing to the correct context.
Go 1.6 makes passing pointers between Go and C a bit more strict (as per this proposal).
The solution to this would be to store contexts in a lookup table, and pass keys instead of direct references down to the C context. I'll see if I can fix this before 1.6 is released.
Started fixing this in #19, there are some issues related to Receivers which need some thinking-through before fixing.
Fixed in #19.
I try to compile with Go 1.6rc1. Here is compiler output: