| 22 | |
| 23 | |
| 24 | static 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 | /* |
nothing calls this directly
no test coverage detected