diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-09-10 14:30:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-09-10 14:30:46 -0300 |
commit | 226c57fec0cc2a1b9457ec4204f13c5b7a108cc7 (patch) | |
tree | 520797ca5f2070ff2c77a4e5756b63bb419dbd60 | |
parent | 0de2065f4e7cbbbe301b07835b9dd0b1bd1a4bbb (diff) | |
download | lua-226c57fec0cc2a1b9457ec4204f13c5b7a108cc7.tar.gz lua-226c57fec0cc2a1b9457ec4204f13c5b7a108cc7.tar.bz2 lua-226c57fec0cc2a1b9457ec4204f13c5b7a108cc7.zip |
simpler configuration to turn on all asserts
-rw-r--r-- | llimits.h | 6 | ||||
-rw-r--r-- | ltests.h | 5 | ||||
-rw-r--r-- | luaconf.h | 6 |
3 files changed, 6 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.58 2004/04/30 20:13:38 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.59 2004/06/23 15:57:29 roberto Exp roberto $ |
3 | ** Limits, basic types, and some other `installation-dependent' definitions | 3 | ** Limits, basic types, and some other `installation-dependent' definitions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -63,9 +63,7 @@ typedef LUSER_ALIGNMENT_T L_Umaxalign; | |||
63 | typedef LUA_UACNUMBER l_uacNumber; | 63 | typedef LUA_UACNUMBER l_uacNumber; |
64 | 64 | ||
65 | 65 | ||
66 | #ifndef check_exp | 66 | #define check_exp(c,e) (lua_assert(c), (e)) |
67 | #define check_exp(c,e) (e) | ||
68 | #endif | ||
69 | 67 | ||
70 | 68 | ||
71 | #ifndef UNUSED | 69 | #ifndef UNUSED |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.8 2004/07/09 14:29:29 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.9 2004/07/16 13:17:00 roberto Exp roberto $ |
3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -17,9 +17,6 @@ | |||
17 | #include <assert.h> | 17 | #include <assert.h> |
18 | #undef lua_assert | 18 | #undef lua_assert |
19 | #define lua_assert(c) assert(c) | 19 | #define lua_assert(c) assert(c) |
20 | #define check_exp(c,e) (lua_assert(c), (e)) | ||
21 | #undef api_check | ||
22 | #define api_check(L, o) lua_assert(o) | ||
23 | 20 | ||
24 | 21 | ||
25 | /* to avoid warnings, and to make sure value is really unused */ | 22 | /* to avoid warnings, and to make sure value is really unused */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.10 2004/08/30 13:44:04 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.11 2004/08/30 18:35:14 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -60,7 +60,7 @@ | |||
60 | #define LUA_FIRSTINDEX 1 | 60 | #define LUA_FIRSTINDEX 1 |
61 | 61 | ||
62 | /* assertions in Lua (mainly for internal debugging) */ | 62 | /* assertions in Lua (mainly for internal debugging) */ |
63 | #define lua_assert(c) /* empty */ | 63 | #define lua_assert(c) ((void)0) |
64 | 64 | ||
65 | /* }====================================================== */ | 65 | /* }====================================================== */ |
66 | 66 | ||
@@ -123,7 +123,7 @@ | |||
123 | #ifdef LUA_CORE | 123 | #ifdef LUA_CORE |
124 | 124 | ||
125 | /* LUA-C API assertions */ | 125 | /* LUA-C API assertions */ |
126 | #define api_check(L, o) /* empty */ | 126 | #define api_check(L, o) lua_assert(o) |
127 | 127 | ||
128 | 128 | ||
129 | /* an unsigned integer with at least 32 bits */ | 129 | /* an unsigned integer with at least 32 bits */ |