MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaB_warn

Function luaB_warn

lib/lua/src/lbaselib.c:45–55  ·  view source on GitHub ↗

** Creates a warning with all given arguments. ** Check first for errors; otherwise an error may interrupt ** the composition of a warning, leaving it unfinished. */

Source from the content-addressed store, hash-verified

43** the composition of a warning, leaving it unfinished.
44*/
45static 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"

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.85
lua_warningFunction · 0.85

Tested by

no test coverage detected