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

Function l_print

third-party/lua-5.5.0/src/lua.c:660–670  ·  view source on GitHub ↗

** Prints (calling the Lua 'print' function) any values on the stack */

Source from the content-addressed store, hash-verified

658** Prints (calling the Lua 'print' function) any values on the stack
659*/
660static void l_print (lua_State *L) {
661 int n = lua_gettop(L);
662 if (n > 0) { /* any result to be printed? */
663 luaL_checkstack(L, LUA_MINSTACK, "too many results to print");
664 lua_getglobal(L, "print");
665 lua_insert(L, 1);
666 if (lua_pcall(L, n, 0, 0) != LUA_OK)
667 l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)",
668 lua_tostring(L, -1)));
669 }
670}
671
672
673/*

Callers 1

doREPLFunction · 0.70

Calls 7

lua_gettopFunction · 0.70
luaL_checkstackFunction · 0.70
lua_getglobalFunction · 0.70
l_messageFunction · 0.70
lua_pushfstringFunction · 0.70
lua_insertFunction · 0.50
lua_pcallFunction · 0.50

Tested by

no test coverage detected