From 437a5b07d415e1a74160ddfd804017171d6cc5cb Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 28 Dec 2018 15:42:34 -0200 Subject: Added a warning system to Lua The warning system is just a way for Lua to emit warnings, messages to the programmer that do not interfere with the running program. --- lstate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 04a9e064..b3e9ec60 100644 --- a/lstate.c +++ b/lstate.c @@ -365,6 +365,8 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { L->next = NULL; g->frealloc = f; g->ud = ud; + g->warnf = NULL; + g->ud_warn = NULL; g->mainthread = L; g->seed = luai_makeseed(L); g->gcrunning = 0; /* no GC while building state */ -- cgit v1.2.3-55-g6feb