aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-12-13 11:00:30 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-12-13 11:00:30 -0300
commit3d03ae5bd6314f27c8635e06ec363150c2c19062 (patch)
treef7a67004721a41a2a042fd897a49dc3fddd4edd0 /lauxlib.c
parent82d721a8554df9b14ff520b4dd55ce5303ab560e (diff)
downloadlua-3d03ae5bd6314f27c8635e06ec363150c2c19062.tar.gz
lua-3d03ae5bd6314f27c8635e06ec363150c2c19062.tar.bz2
lua-3d03ae5bd6314f27c8635e06ec363150c2c19062.zip
'luaL_newstate' starts state with warnings on
It is easier to forget to turn them on then to turn them off.
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 1bb41bb1..7cf90cb7 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1185,7 +1185,7 @@ LUALIB_API lua_State *(luaL_newstate) (void) {
1185 lua_State *L = lua_newstate(luaL_alloc, NULL, luaL_makeseed(NULL)); 1185 lua_State *L = lua_newstate(luaL_alloc, NULL, luaL_makeseed(NULL));
1186 if (l_likely(L)) { 1186 if (l_likely(L)) {
1187 lua_atpanic(L, &panic); 1187 lua_atpanic(L, &panic);
1188 lua_setwarnf(L, warnfoff, L); /* default is warnings off */ 1188 lua_setwarnf(L, warnfon, L);
1189 } 1189 }
1190 return L; 1190 return L;
1191} 1191}