Changes in the warning system
- The warning functions get an extra parameter that tells whether message is to be continued (instead of using end-of-lines as a signal). - The user data for the warning function is a regular value, instead of a writable slot inside the Lua state.
This commit is contained in:
4
lstate.c
4
lstate.c
@@ -411,10 +411,10 @@ LUA_API void lua_close (lua_State *L) {
|
||||
}
|
||||
|
||||
|
||||
void luaE_warning (lua_State *L, const char *msg) {
|
||||
void luaE_warning (lua_State *L, const char *msg, int tocont) {
|
||||
lua_WarnFunction wf = G(L)->warnf;
|
||||
if (wf != NULL)
|
||||
wf(&G(L)->ud_warn, msg);
|
||||
wf(G(L)->ud_warn, msg, tocont);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user