MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / l_print

Function l_print

src/Chain/libraries/glua/single_glua_src/main.cpp:401–411  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

399** Prints (calling the Glua 'print' function) any values on the stack
400*/
401static void l_print(lua_State *L) {
402 int n = lua_gettop(L);
403 if (n > 0) { /* any result to be printed? */
404 luaL_checkstack(L, LUA_MINSTACK, "too many results to print");
405 lua_getglobal(L, "print");
406 lua_insert(L, 1);
407 if (lua_pcall(L, n, 0, 0) != LUA_OK)
408 l_message(progname, lua_pushfstring(L, "error calling 'print' (%s)",
409 lua_tostring(L, -1)));
410 }
411}
412
413
414/*

Callers 1

doREPLFunction · 0.70

Calls 5

lua_gettopFunction · 0.85
luaL_checkstackFunction · 0.85
lua_getglobalFunction · 0.85
lua_pushfstringFunction · 0.85
l_messageFunction · 0.70

Tested by

no test coverage detected