MCPcopy Index your code
hub / github.com/yuin/gopher-lua / ToFunction

Method ToFunction

state.go:1699–1704  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

1697}
1698
1699func (ls *LState) ToFunction(n int) *LFunction {
1700 if lv, ok := ls.Get(n).(*LFunction); ok {
1701 return lv
1702 }
1703 return nil
1704}
1705
1706func (ls *LState) ToUserData(n int) *LUserData {
1707 if lv, ok := ls.Get(n).(*LUserData); ok {

Callers 1

TestToFunctionFunction · 0.45

Calls 1

GetMethod · 0.95

Tested by 1

TestToFunctionFunction · 0.36