diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-01-28 13:13:26 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-01-28 13:13:26 -0200 |
commit | e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce (patch) | |
tree | 0c8fe009fffa187be71ea3e268daf1a6e29d6d9a /llimits.h | |
parent | 89110986d7a9e81960261ae682780d5fd06dc4ac (diff) | |
download | lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.gz lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.bz2 lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.zip |
janitor work on casts
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llimits.h,v 1.147 2017/12/11 18:53:53 roberto Exp roberto $ | 2 | ** $Id: llimits.h,v 1.148 2017/12/28 11:51:00 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 | */ |
@@ -104,10 +104,15 @@ typedef LUAI_UACINT l_uacInt; | |||
104 | #define cast(t, exp) ((t)(exp)) | 104 | #define cast(t, exp) ((t)(exp)) |
105 | 105 | ||
106 | #define cast_void(i) cast(void, (i)) | 106 | #define cast_void(i) cast(void, (i)) |
107 | #define cast_byte(i) cast(lu_byte, (i)) | 107 | #define cast_voidp(i) cast(void *, (i)) |
108 | #define cast_num(i) cast(lua_Number, (i)) | 108 | #define cast_num(i) cast(lua_Number, (i)) |
109 | #define cast_int(i) cast(int, (i)) | 109 | #define cast_int(i) cast(int, (i)) |
110 | #define cast_uint(i) cast(unsigned int, (i)) | ||
111 | #define cast_byte(i) cast(lu_byte, (i)) | ||
110 | #define cast_uchar(i) cast(unsigned char, (i)) | 112 | #define cast_uchar(i) cast(unsigned char, (i)) |
113 | #define cast_char(i) cast(char, (i)) | ||
114 | #define cast_charp(i) cast(char *, (i)) | ||
115 | #define cast_sizet(i) cast(size_t, (i)) | ||
111 | 116 | ||
112 | 117 | ||
113 | /* cast a signed lua_Integer to lua_Unsigned */ | 118 | /* cast a signed lua_Integer to lua_Unsigned */ |