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
lua.h
4
lua.h
@@ -128,7 +128,7 @@ typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
|
||||
/*
|
||||
** Type for warning functions
|
||||
*/
|
||||
typedef void (*lua_WarnFunction) (void **pud, const char *msg);
|
||||
typedef void (*lua_WarnFunction) (void *ud, const char *msg, int tocont);
|
||||
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ LUA_API int (lua_isyieldable) (lua_State *L);
|
||||
** Warning-related functions
|
||||
*/
|
||||
LUA_API void (lua_setwarnf) (lua_State *L, lua_WarnFunction f, void *ud);
|
||||
LUA_API void (lua_warning) (lua_State *L, const char *msg);
|
||||
LUA_API void (lua_warning) (lua_State *L, const char *msg, int tocont);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user