aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-28 15:42:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-28 15:42:34 -0200
commit437a5b07d415e1a74160ddfd804017171d6cc5cb (patch)
tree861f9a56ae175eaed91c163409c33ab85bee7ff9 /lua.h
parentba7da13ec5938f978c37d63aa40a3e340b301f79 (diff)
downloadlua-437a5b07d415e1a74160ddfd804017171d6cc5cb.tar.gz
lua-437a5b07d415e1a74160ddfd804017171d6cc5cb.tar.bz2
lua-437a5b07d415e1a74160ddfd804017171d6cc5cb.zip
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.
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lua.h b/lua.h
index 95ce5a2e..a6f8268b 100644
--- a/lua.h
+++ b/lua.h
@@ -126,6 +126,13 @@ typedef int (*lua_Writer) (lua_State *L, const void *p, size_t sz, void *ud);
126typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); 126typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
127 127
128 128
129/*
130** Type for warning functions
131*/
132typedef void (*lua_WarnFunction) (void **pud, const char *msg);
133
134
135
129 136
130/* 137/*
131** generic extra include file 138** generic extra include file
@@ -300,6 +307,13 @@ LUA_API int (lua_isyieldable) (lua_State *L);
300 307
301 308
302/* 309/*
310** Warning-related functions
311*/
312LUA_API void (lua_setwarnf) (lua_State *L, lua_WarnFunction f, void *ud);
313LUA_API void (lua_warning) (lua_State *L, const char *msg);
314
315
316/*
303** garbage-collection function and options 317** garbage-collection function and options
304*/ 318*/
305 319