** Creates a warning with all given arguments. ** Check first for errors; otherwise an error may interrupt ** the composition of a warning, leaving it unfinished. */
| 43 | ** the composition of a warning, leaving it unfinished. |
| 44 | */ |
| 45 | static int luaB_warn (lua_State *L) { |
| 46 | int n = lua_gettop(L); /* number of arguments */ |
| 47 | int i; |
| 48 | luaL_checkstring(L, 1); /* at least one argument */ |
| 49 | for (i = 2; i <= n; i++) |
| 50 | luaL_checkstring(L, i); /* make sure all arguments are strings */ |
| 51 | for (i = 1; i < n; i++) /* compose warning */ |
| 52 | lua_warning(L, lua_tostring(L, i), 1); |
| 53 | lua_warning(L, lua_tostring(L, n), 0); /* close warning */ |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | |
| 58 | #define SPACECHARS " \f\n\r\t\v" |
nothing calls this directly
no test coverage detected