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

Method GPCall

state.go:2097–2101  ·  view source on GitHub ↗
(fn LGFunction, data LValue)

Source from the content-addressed store, hash-verified

2095}
2096
2097func (ls *LState) GPCall(fn LGFunction, data LValue) error {
2098 ls.Push(newLFunctionG(fn, ls.currentEnv(), 0))
2099 ls.Push(data)
2100 return ls.PCall(1, MultRet, nil)
2101}
2102
2103func (ls *LState) CallByParam(cp P, args ...LValue) error {
2104 ls.Push(cp.Fn)

Callers 2

errorIfGFuncFailFunction · 0.45
errorIfGFuncNotFailFunction · 0.45

Calls 4

PushMethod · 0.95
currentEnvMethod · 0.95
PCallMethod · 0.95
newLFunctionGFunction · 0.85

Tested by 2

errorIfGFuncFailFunction · 0.36
errorIfGFuncNotFailFunction · 0.36