diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-20 13:42:26 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-20 13:42:26 -0300 |
commit | be78aeae4c429d7d68af3a3e1b0cf8e52fcff160 (patch) | |
tree | e81d25014e238f589997f109ba10a875c3a875dc /lauxlib.c | |
parent | 5bc47fe83087e0686f4639d031801837846e4c65 (diff) | |
download | lua-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |