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

Function l_print

third-party/lua-5.4.6/src/lua.c:585–595  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

583** Prints (calling the Lua 'print' function) any values on the stack
584*/
585static void l_print (lua_State *L) {
586 int n = lua_gettop(L);
587 if (n > 0) { /* any result to be printed? */
588 luaL_checkstack(L, LUA_MINSTACK, "too many results to print");
589 lua_getglobal(L, "print");
590 lua_insert(L, 1);
591 if (lua_pcall(L, n, 0, 0) != LUA_OK)
592 l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)",
593 lua_tostring(L, -1)));
594 }
595}
596
597
598/*

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