MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaB_warn

Function luaB_warn

third-party/lua-5.5.0/src/lbaselib.c:46–56  ·  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

44** the composition of a warning, leaving it unfinished.
45*/
46static int luaB_warn (lua_State *L) {
47 int n = lua_gettop(L); /* number of arguments */
48 int i;
49 luaL_checkstring(L, 1); /* at least one argument */
50 for (i = 2; i <= n; i++)
51 luaL_checkstring(L, i); /* make sure all arguments are strings */
52 for (i = 1; i < n; i++) /* compose warning */
53 lua_warning(L, lua_tostring(L, i), 1);
54 lua_warning(L, lua_tostring(L, n), 0); /* close warning */
55 return 0;
56}
57
58
59#define SPACECHARS " \f\n\r\t\v"

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.70
lua_warningFunction · 0.70

Tested by

no test coverage detected