diff options
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -102,18 +102,19 @@ typedef LUAI_UACINT l_uacInt; | |||
102 | #undef NDEBUG | 102 | #undef NDEBUG |
103 | #include <assert.h> | 103 | #include <assert.h> |
104 | #define lua_assert(c) assert(c) | 104 | #define lua_assert(c) assert(c) |
105 | #define assert_code(c) c | ||
105 | #endif | 106 | #endif |
106 | 107 | ||
107 | #if defined(lua_assert) | 108 | #if defined(lua_assert) |
108 | #define check_exp(c,e) (lua_assert(c), (e)) | ||
109 | /* to avoid problems with conditions too long */ | ||
110 | #define lua_longassert(c) ((c) ? (void)0 : lua_assert(0)) | ||
111 | #else | 109 | #else |
112 | #define lua_assert(c) ((void)0) | 110 | #define lua_assert(c) ((void)0) |
113 | #define check_exp(c,e) (e) | 111 | #define assert_code(c) ((void)0) |
114 | #define lua_longassert(c) ((void)0) | ||
115 | #endif | 112 | #endif |
116 | 113 | ||
114 | #define check_exp(c,e) (lua_assert(c), (e)) | ||
115 | /* to avoid problems with conditions too long */ | ||
116 | #define lua_longassert(c) assert_code((c) ? (void)0 : lua_assert(0)) | ||
117 | |||
117 | 118 | ||
118 | /* macro to avoid warnings about unused variables */ | 119 | /* macro to avoid warnings about unused variables */ |
119 | #if !defined(UNUSED) | 120 | #if !defined(UNUSED) |