aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-07-08 15:51:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-07-08 15:51:55 -0300
commit6f5bd5072dff07679c390eecfeaa9d20cc45a9ef (patch)
treee7025f2595fe225b165b6a9daae53c86013139ca /llimits.h
parent56ec4322817b0e9aef6084c278dcf24fda7bed1c (diff)
downloadlua-6f5bd5072dff07679c390eecfeaa9d20cc45a9ef.tar.gz
lua-6f5bd5072dff07679c390eecfeaa9d20cc45a9ef.tar.bz2
lua-6f5bd5072dff07679c390eecfeaa9d20cc45a9ef.zip
Macro LUAI_ASSERT eases turning assertions on
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/llimits.h b/llimits.h
index b86d3452..48c97f95 100644
--- a/llimits.h
+++ b/llimits.h
@@ -84,7 +84,15 @@ typedef LUAI_UACNUMBER l_uacNumber;
84typedef LUAI_UACINT l_uacInt; 84typedef LUAI_UACINT l_uacInt;
85 85
86 86
87/* internal assertions for in-house debugging */ 87/*
88** Internal assertions for in-house debugging
89*/
90#if defined LUAI_ASSERT
91#undef NDEBUG
92#include <assert.h>
93#define lua_assert(c) assert(c)
94#endif
95
88#if defined(lua_assert) 96#if defined(lua_assert)
89#define check_exp(c,e) (lua_assert(c), (e)) 97#define check_exp(c,e) (lua_assert(c), (e))
90/* to avoid problems with conditions too long */ 98/* to avoid problems with conditions too long */