diff options
| author | Lua Team <team@lua.org> | 2006-01-12 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2006-01-12 12:00:00 +0000 |
| commit | 4f266285f998d0d14c4e83cc29772f0de1a7fbba (patch) | |
| tree | a122a829730d9f96e3a4e2bf65347490a8759800 /src/llimits.h | |
| parent | b3196343ba1a5dfe10e68eb9c61dc0ad5bb961a8 (diff) | |
| download | lua-github-4f266285f998d0d14c4e83cc29772f0de1a7fbba.tar.gz | |
Lua 5.1-rc15.1-rc1
Diffstat (limited to 'src/llimits.h')
| -rw-r--r-- | src/llimits.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/llimits.h b/src/llimits.h index 68c28c8c..b03221ae 100644 --- a/src/llimits.h +++ b/src/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.67 2005/08/24 16:15:49 roberto Exp $ +** $Id: llimits.h,v 1.69 2005/12/27 17:12:00 roberto Exp $ ** Limits, basic types, and some other `installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -15,9 +15,6 @@ #include "lua.h" -#define api_check luai_apicheck - - typedef LUAI_UINT32 lu_int32; typedef LUAI_UMEM lu_mem; @@ -54,7 +51,19 @@ typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; typedef LUAI_UACNUMBER l_uacNumber; -#define check_exp(c,e) (lua_assert(c), (e)) +/* internal assertions for in-house debugging */ +#ifdef lua_assert + +#define check_exp(c,e) (lua_assert(c), (e)) +#define api_check(l,e) lua_assert(e) + +#else + +#define lua_assert(c) ((void)0) +#define check_exp(c,e) (e) +#define api_check luai_apicheck + +#endif #ifndef UNUSED @@ -66,6 +75,10 @@ typedef LUAI_UACNUMBER l_uacNumber; #define cast(t, exp) ((t)(exp)) #endif +#define cast_byte(i) cast(lu_byte, (i)) +#define cast_num(i) cast(lua_Number, (i)) +#define cast_int(i) cast(int, (i)) + /* |
