** Creates a warning with all given arguments. ** Check first for errors; otherwise an error may interrupt ** the composition of a warning, leaving it unfinished. */
| 58 | ** the composition of a warning, leaving it unfinished. |
| 59 | */ |
| 60 | static int luaB_warn (lua_State *L) { |
| 61 | int n = lua_gettop(L); /* number of arguments */ |
| 62 | int i; |
| 63 | luaL_checkstring(L, 1); /* at least one argument */ |
| 64 | for (i = 2; i <= n; i++) |
| 65 | luaL_checkstring(L, i); /* make sure all arguments are strings */ |
| 66 | for (i = 1; i < n; i++) /* compose warning */ |
| 67 | lua_warning(L, lua_tostring(L, i), 1); |
| 68 | lua_warning(L, lua_tostring(L, n), 0); /* close warning */ |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | |
| 73 | static int luaB_wcall (lua_State *L) { |
nothing calls this directly
no test coverage detected