MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaL_where

Function luaL_where

third-party/lua-5.5.0/src/lauxlib.c:220–230  ·  view source on GitHub ↗

** The use of 'lua_pushfstring' ensures this function does not ** need reserved stack space when called. */

Source from the content-addressed store, hash-verified

218** need reserved stack space when called.
219*/
220LUALIB_API void luaL_where (lua_State *L, int level) {
221 lua_Debug ar;
222 if (lua_getstack(L, level, &ar)) { /* check function at level */
223 lua_getinfo(L, "Sl", &ar); /* get info about it */
224 if (ar.currentline > 0) { /* is there info? */
225 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
226 return;
227 }
228 }
229 lua_pushfstring(L, ""); /* else, no information available... */
230}
231
232
233/*

Callers 3

luaB_errorFunction · 0.70
luaL_errorFunction · 0.70
luaB_auxwrapFunction · 0.70

Calls 3

lua_getstackFunction · 0.70
lua_getinfoFunction · 0.70
lua_pushfstringFunction · 0.70

Tested by

no test coverage detected