MCPcopy Index your code
hub / github.com/Shopify/go-lua / pushGlobalFunctionName

Function pushGlobalFunctionName

auxiliary.go:163–174  ·  view source on GitHub ↗
(l *State, f Frame)

Source from the content-addressed store, hash-verified

161}
162
163func pushGlobalFunctionName(l *State, f Frame) bool {
164 top := l.Top()
165 Info(l, "f", f) // push function
166 l.PushGlobalTable()
167 if findField(l, top+1, 2) {
168 l.Copy(-1, top+1) // move name to proper place
169 l.Pop(2) // remove pushed values
170 return true
171 }
172 l.SetTop(top) // remove function and global table
173 return false
174}
175
176func typeError(l *State, argCount int, typeName string) {
177 ArgumentError(l, argCount, l.PushString(typeName+" expected, got "+TypeNameOf(l, argCount)))

Callers 2

functionNameFunction · 0.85
ArgumentErrorFunction · 0.85

Calls 7

InfoFunction · 0.85
findFieldFunction · 0.85
TopMethod · 0.80
PushGlobalTableMethod · 0.80
CopyMethod · 0.80
PopMethod · 0.80
SetTopMethod · 0.80

Tested by

no test coverage detected