aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-03 10:39:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-03 10:39:38 -0300
commitd41c36bf67d6628bccd91697e7f88e55d40d3970 (patch)
treee6d57995dfc015e03c209777cc204e1e8bd5c719 /lauxlib.h
parentd9d2904f09a8039522dfd6f118d4e37bffd5bdf6 (diff)
downloadlua-d41c36bf67d6628bccd91697e7f88e55d40d3970.tar.gz
lua-d41c36bf67d6628bccd91697e7f88e55d40d3970.tar.bz2
lua-d41c36bf67d6628bccd91697e7f88e55d40d3970.zip
'lua_assert' moved from 'lualib.h' to 'lauxlib.h'
The macro is useful also in 'lauxlib.c', which does not include 'lualib.h'. Also, the definition was corrected to be "on" when LUAI_ASSERT is defined.
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lauxlib.h b/lauxlib.h
index 59fef6af..df3de4f8 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -158,6 +158,18 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname,
158 158
159 159
160/* 160/*
161** Internal assertions for in-house debugging
162*/
163#if defined LUAI_ASSERT
164#include <assert.h>
165#define lua_assert(c) assert(c)
166#else
167#define lua_assert(x) ((void)0)
168#endif
169
170
171
172/*
161** {====================================================== 173** {======================================================
162** Generic Buffer manipulation 174** Generic Buffer manipulation
163** ======================================================= 175** =======================================================