mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03: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:
parent
82d721a855
commit
3d03ae5bd6
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue