MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaL_where

Function luaL_where

extlibs/lua/src/lauxlib.c:216–226  ·  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

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

Callers 3

luaB_errorFunction · 0.85
luaL_errorFunction · 0.85
luaB_auxwrapFunction · 0.85

Calls 3

lua_getstackFunction · 0.85
lua_getinfoFunction · 0.85
lua_pushfstringFunction · 0.85

Tested by

no test coverage detected