stevedonovan / luar

luar is a Go package for conveniently working with the luago Lua bindings. Arbitrary Go functions can be registered
MIT License
301 stars 55 forks source link

PCall removal #3

Closed aarzilli closed 11 years ago

aarzilli commented 11 years ago

I had to remove lua.State.PCall from golua. All lua code needs to be executed in a protected environment setup by golua or lua might longjump over pieces of go's own stack, which is bad. So there is no safe way to expose the lua_pcall interface to the user. I decided to remove it instead of exposing a fake one that ignores its third argument. lua.State.Call uses lua_pcall in a safe way now. Sorry for the trouble.