Get rid of the remaining silly cast macros from Lua.

This commit is contained in:
Mike Pall
2011-03-10 02:13:43 +01:00
parent bfce3c1127
commit 889368e921
17 changed files with 58 additions and 65 deletions

View File

@@ -74,13 +74,7 @@ typedef unsigned __int32 uintptr_t;
#define UNUSED(x) ((void)(x)) /* to avoid warnings */
#endif
#ifndef cast
#define cast(t, exp) ((t)(exp))
#endif
#define U64x(hi, lo) (((uint64_t)0x##hi << 32) + (uint64_t)0x##lo)
#define cast_byte(i) cast(uint8_t, (i))
#define cast_num(i) cast(lua_Number, (i))
#define i32ptr(p) ((int32_t)(intptr_t)(void *)(p))
#define u32ptr(p) ((uint32_t)(intptr_t)(void *)(p))