MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaB_warn

Function luaB_warn

src/lbaselib.cpp:60–70  ·  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

58** the composition of a warning, leaving it unfinished.
59*/
60static 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
73static int luaB_wcall (lua_State *L) {

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.85
lua_warningFunction · 0.85

Tested by

no test coverage detected