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

Method NewFunction

state.go:1638–1640  ·  view source on GitHub ↗
(fn LGFunction)

Source from the content-addressed store, hash-verified

1636}
1637
1638func (ls *LState) NewFunction(fn LGFunction) *LFunction {
1639 return newLFunctionG(fn, ls.currentEnv(), 0)
1640}
1641
1642func (ls *LState) NewClosure(fn LGFunction, upvalues ...LValue) *LFunction {
1643 cl := newLFunctionG(fn, ls.currentEnv(), len(upvalues))

Callers 15

RegisterModuleMethod · 0.95
PreloadModuleMethod · 0.95
RegisterMethod · 0.95
OpenLibsMethod · 0.95
OpenPackageFunction · 0.45
OpenBaseFunction · 0.45
TestCheckFunctionFunction · 0.45
TestOptFunctionFunction · 0.45
OpenIoFunction · 0.45
OpenStringFunction · 0.45
TestToFunctionFunction · 0.45
TestObjLenFunction · 0.45

Calls 2

currentEnvMethod · 0.95
newLFunctionGFunction · 0.85

Tested by 7

TestCheckFunctionFunction · 0.36
TestOptFunctionFunction · 0.36
TestToFunctionFunction · 0.36
TestObjLenFunction · 0.36
TestPCallFunction · 0.36
TestPCallAfterFailFunction · 0.36
TestLocalVarFreeFunction · 0.36