aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-20 13:42:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-20 13:42:26 -0300
commitbe78aeae4c429d7d68af3a3e1b0cf8e52fcff160 (patch)
treee81d25014e238f589997f109ba10a875c3a875dc /lauxlib.c
parent5bc47fe83087e0686f4639d031801837846e4c65 (diff)
downloadlua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.tar.gz
lua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.tar.bz2
lua-be78aeae4c429d7d68af3a3e1b0cf8e52fcff160.zip
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.
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c2
1 files changed, 1 insertions, 1 deletions
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) {
1037 lua_atpanic(L, &panic); 1037 lua_atpanic(L, &panic);
1038 warnstate = (int *)lua_newuserdatauv(L, sizeof(int), 0); 1038 warnstate = (int *)lua_newuserdatauv(L, sizeof(int), 0);
1039 luaL_ref(L, LUA_REGISTRYINDEX); /* make sure it won't be collected */ 1039 luaL_ref(L, LUA_REGISTRYINDEX); /* make sure it won't be collected */
1040 *warnstate = 1; /* next message starts a new warning */ 1040 *warnstate = 0; /* default is warnings off */
1041 lua_setwarnf(L, warnf, warnstate); 1041 lua_setwarnf(L, warnf, warnstate);
1042 } 1042 }
1043 return L; 1043 return L;