Register sets the Go function f as the new value of global name. If name was already defined, it is overwritten. http://www.lua.org/manual/5.2/manual.html#lua_register
(name string, f Function)
| 1220 | // |
| 1221 | // http://www.lua.org/manual/5.2/manual.html#lua_register |
| 1222 | func (l *State) Register(name string, f Function) { |
| 1223 | l.PushGoFunction(f) |
| 1224 | l.SetGlobal(name) |
| 1225 | } |
| 1226 | |
| 1227 | func (l *State) setErrorObject(err error, oldTop int) { |
| 1228 | switch err { |