From d41c36bf67d6628bccd91697e7f88e55d40d3970 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 3 Dec 2020 10:39:38 -0300 Subject: '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. --- lauxlib.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lauxlib.h') diff --git a/lauxlib.h b/lauxlib.h index 59fef6af..df3de4f8 100644 --- a/lauxlib.h +++ b/lauxlib.h @@ -157,6 +157,18 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, #define luaL_pushfail(L) lua_pushnil(L) +/* +** Internal assertions for in-house debugging +*/ +#if defined LUAI_ASSERT +#include +#define lua_assert(c) assert(c) +#else +#define lua_assert(x) ((void)0) +#endif + + + /* ** {====================================================== ** Generic Buffer manipulation -- cgit v1.2.3-55-g6feb