From be78aeae4c429d7d68af3a3e1b0cf8e52fcff160 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 20 Aug 2019 13:42:26 -0300 Subject: Default for warnings changed to "off" Warnings are mostly a tool to help developers (e.g., by showing hidden error messages); regular users usually don't need to see them. --- lauxlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 5a040ac6..b6740b17 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1037,7 +1037,7 @@ LUALIB_API lua_State *luaL_newstate (void) { lua_atpanic(L, &panic); warnstate = (int *)lua_newuserdatauv(L, sizeof(int), 0); luaL_ref(L, LUA_REGISTRYINDEX); /* make sure it won't be collected */ - *warnstate = 1; /* next message starts a new warning */ + *warnstate = 0; /* default is warnings off */ lua_setwarnf(L, warnf, warnstate); } return L; -- cgit v1.2.3-55-g6feb