Converts the Lua value at the given acceptable index to the chan LValue.
(n int)
| 2278 | |
| 2279 | // Converts the Lua value at the given acceptable index to the chan LValue. |
| 2280 | func (ls *LState) ToChannel(n int) chan LValue { |
| 2281 | if lv, ok := ls.Get(n).(LChannel); ok { |
| 2282 | return (chan LValue)(lv) |
| 2283 | } |
| 2284 | return nil |
| 2285 | } |
| 2286 | |
| 2287 | // RemoveCallerFrame removes the stack frame above the current stack frame. This is useful in tail calls. It returns |
| 2288 | // the new current frame. |