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

Method Top

lua.go:1367–1367  ·  view source on GitHub ↗

Top returns the index of the top element in the stack. Because Lua indices start at 1, this result is equal to the number of elements in the stack (hence 0 means an empty stack). http://www.lua.org/manual/5.2/manual.html#lua_gettop

()

Source from the content-addressed store, hash-verified

1365//
1366// http://www.lua.org/manual/5.2/manual.html#lua_gettop
1367func (l *State) Top() int { return l.top - (l.callInfo.function + 1) }
1368
1369// Copy moves the element at the index from into the valid index to
1370// without shifting any element (therefore replacing the value at that

Callers 15

TestLuaFunction · 0.95
TestErrorFunction · 0.95
TestErrorfFunction · 0.95
TestLoadFileSyntaxErrorFunction · 0.95
ExampleFunctionFunction · 0.80
bitOpFunction · 0.80
finishProtectedCallFunction · 0.80
base.goFile · 0.80
string.goFile · 0.80
table.goFile · 0.80
writeFunction · 0.80

Calls

no outgoing calls

Tested by 6

TestLuaFunction · 0.76
TestErrorFunction · 0.76
TestErrorfFunction · 0.76
TestLoadFileSyntaxErrorFunction · 0.76
ExampleFunctionFunction · 0.64