aarzilli / golua

Go bindings for Lua C API - in progress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go1.6 support

shanemhansen opened this issue · comments

It looks like golua violates the go1.6 CGO pointer rules.

Test program:

L := lua.NewState()
L.OpenLibs()
defer L.Close()

output:

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
github.com/aarzilli/golua/lua.newState(0xdb8400, 0x0)
    /home/shansen/src/github.com/aarzilli/golua/lua/lua.go:41 +0x23e
github.com/aarzilli/golua/lua.NewState(0x7f1345e3b078)
    /home/shansen/src/github.com/aarzilli/golua/lua/lauxlib.go:169 +0x25
main.main()
    /home/shansen/src/$snip/main.go:8 +0x18
exit status 2

More info about the new rules here: https://tip.golang.org/doc/go1

Thanks for the heads up.

Thanks for fixing!