From e2ea3b31c94bb3e1da27c233661cb2a16699c685 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 7 Dec 2020 11:17:30 -0300 Subject: Details (do not affect regular code) * Avoids multiple definitions of 'lua_assert' in test file. * Smaller C-stack limit in test mode. * Note in the manual about the use of false * Extra test for constant reuse. --- lauxlib.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lauxlib.h') diff --git a/lauxlib.h b/lauxlib.h index df3de4f8..65714911 100644 --- a/lauxlib.h +++ b/lauxlib.h @@ -160,11 +160,15 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, /* ** Internal assertions for in-house debugging */ +#if !defined(lua_assert) + #if defined LUAI_ASSERT -#include -#define lua_assert(c) assert(c) + #include + #define lua_assert(c) assert(c) #else -#define lua_assert(x) ((void)0) + #define lua_assert(c) ((void)0) +#endif + #endif -- cgit v1.2.3-55-g6feb