MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaB_print

Function luaB_print

3rd/lua-5.4.3/src/lbaselib.c:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.85
luaL_tolstringFunction · 0.85

Tested by

no test coverage detected