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

Method Register

state.go:2005–2007  ·  view source on GitHub ↗

* }}} */ * register operations {{{ */

(name string, fn LGFunction)

Source from the content-addressed store, hash-verified

2003/* register operations {{{ */
2004
2005func (ls *LState) Register(name string, fn LGFunction) {
2006 ls.SetGlobal(name, ls.NewFunction(fn))
2007}
2008
2009/* }}} */
2010

Callers 2

TestPCallFunction · 0.45
TestCoroutineApi1Function · 0.45

Calls 2

SetGlobalMethod · 0.95
NewFunctionMethod · 0.95

Tested by 2

TestPCallFunction · 0.36
TestCoroutineApi1Function · 0.36