// Returns the value at index as a Go function (it must be something pushed with PushGoFunction) func (L *State) ToGoFunction(index int) (f LuaGoFunction) { if !L.IsGoFunction(index) { return nil } fid := C.clua_togofunction(L.s, C.int(index)) if fid < 0 { return nil } return L.registry[fid].(LuaGoFunction) }
func (L *State) ToGoFunction(index int) (f GoFunction) { fid := C.clua_togofunction(L.s, C.int(index)) return L.registry[fid].(GoFunction) }