mirror of
https://github.com/lua/lua.git
synced 2026-09-14 06:18:10 +00:00
'luaL_newstate' starts state with warnings on
It is easier to forget to turn them on then to turn them off.
This commit is contained in:
@@ -1185,7 +1185,7 @@ LUALIB_API lua_State *(luaL_newstate) (void) {
|
||||
lua_State *L = lua_newstate(luaL_alloc, NULL, luaL_makeseed(NULL));
|
||||
if (l_likely(L)) {
|
||||
lua_atpanic(L, &panic);
|
||||
lua_setwarnf(L, warnfoff, L); /* default is warnings off */
|
||||
lua_setwarnf(L, warnfon, L);
|
||||
}
|
||||
return L;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user