From e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sun, 28 Jan 2018 13:13:26 -0200 Subject: janitor work on casts --- llimits.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'llimits.h') diff --git a/llimits.h b/llimits.h index a9295645..9a3ae8d0 100644 --- a/llimits.h +++ b/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.147 2017/12/11 18:53:53 roberto Exp roberto $ +** $Id: llimits.h,v 1.148 2017/12/28 11:51:00 roberto Exp roberto $ ** Limits, basic types, and some other 'installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -104,10 +104,15 @@ typedef LUAI_UACINT l_uacInt; #define cast(t, exp) ((t)(exp)) #define cast_void(i) cast(void, (i)) -#define cast_byte(i) cast(lu_byte, (i)) +#define cast_voidp(i) cast(void *, (i)) #define cast_num(i) cast(lua_Number, (i)) #define cast_int(i) cast(int, (i)) +#define cast_uint(i) cast(unsigned int, (i)) +#define cast_byte(i) cast(lu_byte, (i)) #define cast_uchar(i) cast(unsigned char, (i)) +#define cast_char(i) cast(char, (i)) +#define cast_charp(i) cast(char *, (i)) +#define cast_sizet(i) cast(size_t, (i)) /* cast a signed lua_Integer to lua_Unsigned */ -- cgit v1.2.3-55-g6feb