diff options
-rw-r--r-- | llimits.h | 19 | ||||
-rw-r--r-- | ltests.h | 3 | ||||
-rw-r--r-- | luaconf.h | 12 | ||||
-rw-r--r-- | lualib.h | 8 |
4 files changed, 24 insertions, 18 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.67 2005/08/24 16:15:49 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.68 2005/12/22 16:19:56 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 | */ |
@@ -15,9 +15,6 @@ | |||
15 | #include "lua.h" | 15 | #include "lua.h" |
16 | 16 | ||
17 | 17 | ||
18 | #define api_check luai_apicheck | ||
19 | |||
20 | |||
21 | typedef LUAI_UINT32 lu_int32; | 18 | typedef LUAI_UINT32 lu_int32; |
22 | 19 | ||
23 | typedef LUAI_UMEM lu_mem; | 20 | typedef LUAI_UMEM lu_mem; |
@@ -54,7 +51,19 @@ typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; | |||
54 | typedef LUAI_UACNUMBER l_uacNumber; | 51 | typedef LUAI_UACNUMBER l_uacNumber; |
55 | 52 | ||
56 | 53 | ||
57 | #define check_exp(c,e) (lua_assert(c), (e)) | 54 | /* internal assertions for in-house debugging */ |
55 | #ifdef lua_assert | ||
56 | |||
57 | #define check_exp(c,e) (lua_assert(c), (e)) | ||
58 | #define api_check(l,e) lua_assert(e) | ||
59 | |||
60 | #else | ||
61 | |||
62 | #define lua_assert(c) ((void)0) | ||
63 | #define check_exp(c,e) (e) | ||
64 | #define api_check luai_apicheck | ||
65 | |||
66 | #endif | ||
58 | 67 | ||
59 | 68 | ||
60 | #ifndef UNUSED | 69 | #ifndef UNUSED |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.15 2005/06/06 13:30:25 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.16 2005/09/14 17:48:57 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 | */ |
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #undef NDEBUG | 16 | #undef NDEBUG |
17 | #include <assert.h> | 17 | #include <assert.h> |
18 | #undef lua_assert | ||
19 | #define lua_assert(c) assert(c) | 18 | #define lua_assert(c) assert(c) |
20 | 19 | ||
21 | 20 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.75 2005/11/25 13:29:11 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.76 2005/12/15 18:53:34 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 | */ |
@@ -183,13 +183,6 @@ | |||
183 | 183 | ||
184 | 184 | ||
185 | /* | 185 | /* |
186 | @@ lua_assert describes the internal assertions in Lua. | ||
187 | ** CHANGE that only if you need to debug Lua. | ||
188 | */ | ||
189 | #define lua_assert(c) ((void)0) | ||
190 | |||
191 | |||
192 | /* | ||
193 | @@ LUA_QL describes how error messages quote program elements. | 186 | @@ LUA_QL describes how error messages quote program elements. |
194 | ** CHANGE it if you want a different appearance. | 187 | ** CHANGE it if you want a different appearance. |
195 | */ | 188 | */ |
@@ -373,8 +366,7 @@ | |||
373 | #include <assert.h> | 366 | #include <assert.h> |
374 | #define luai_apicheck(L,o) { (void)L; assert(o); } | 367 | #define luai_apicheck(L,o) { (void)L; assert(o); } |
375 | #else | 368 | #else |
376 | /* (By default lua_assert is empty, so luai_apicheck is also empty.) */ | 369 | #define luai_apicheck(L,o) { (void)L; } |
377 | #define luai_apicheck(L,o) { (void)L; lua_assert(o); } | ||
378 | #endif | 370 | #endif |
379 | 371 | ||
380 | 372 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lualib.h,v 1.34 2005/04/13 17:24:20 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.35 2005/08/10 18:06:58 roberto Exp roberto $ |
3 | ** Lua standard libraries | 3 | ** Lua standard libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -44,4 +44,10 @@ LUALIB_API int (luaopen_package) (lua_State *L); | |||
44 | LUALIB_API void (luaL_openlibs) (lua_State *L); | 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); |
45 | 45 | ||
46 | 46 | ||
47 | |||
48 | #ifndef lua_assert | ||
49 | #define lua_assert(x) ((void)0) | ||
50 | #endif | ||
51 | |||
52 | |||
47 | #endif | 53 | #endif |