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

Function luaB_print

third-party/lua-5.5.0/src/lbaselib.c:25–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25static int luaB_print (lua_State *L) {
26 int n = lua_gettop(L); /* number of arguments */
27 int i;
28 for (i = 1; i <= n; i++) { /* for each argument */
29 size_t l;
30 const char *s = luaL_tolstring(L, i, &l); /* convert it to string */
31 if (i > 1) /* not the first element? */
32 lua_writestring("\t", 1); /* add a tab before it */
33 lua_writestring(s, l); /* print it */
34 lua_pop(L, 1); /* pop result */
35 }
36 lua_writeline();
37 return 0;
38}
39
40
41/*

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.70
luaL_tolstringFunction · 0.70

Tested by

no test coverage detected