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 /lobject.h | |
parent | 89110986d7a9e81960261ae682780d5fd06dc4ac (diff) | |
download | lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.gz lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.bz2 lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.zip |
janitor work on casts
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.131 2017/11/23 19:29:04 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.132 2018/01/28 12:07:53 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -351,7 +351,7 @@ typedef union UTString { | |||
351 | ** (Access to 'extra' ensures that value is really a 'TString'.) | 351 | ** (Access to 'extra' ensures that value is really a 'TString'.) |
352 | */ | 352 | */ |
353 | #define getstr(ts) \ | 353 | #define getstr(ts) \ |
354 | check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString)) | 354 | check_exp(sizeof((ts)->extra), cast_charp((ts)) + sizeof(UTString)) |
355 | 355 | ||
356 | 356 | ||
357 | /* get the actual string (array of bytes) from a Lua value */ | 357 | /* get the actual string (array of bytes) from a Lua value */ |
@@ -391,7 +391,7 @@ typedef union UUdata { | |||
391 | ** (Access to 'ttuv_' ensures that value is really a 'Udata'.) | 391 | ** (Access to 'ttuv_' ensures that value is really a 'Udata'.) |
392 | */ | 392 | */ |
393 | #define getudatamem(u) \ | 393 | #define getudatamem(u) \ |
394 | check_exp(sizeof((u)->ttuv_), (cast(char*, (u)) + sizeof(UUdata))) | 394 | check_exp(sizeof((u)->ttuv_), (cast_charp(u) + sizeof(UUdata))) |
395 | 395 | ||
396 | #define setuservalue(L,u,o) \ | 396 | #define setuservalue(L,u,o) \ |
397 | { const TValue *io=(o); Udata *iu = (u); \ | 397 | { const TValue *io=(o); Udata *iu = (u); \ |
@@ -607,7 +607,7 @@ typedef struct Table { | |||
607 | ** 'module' operation for hashing (size is always a power of 2) | 607 | ** 'module' operation for hashing (size is always a power of 2) |
608 | */ | 608 | */ |
609 | #define lmod(s,size) \ | 609 | #define lmod(s,size) \ |
610 | (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1))))) | 610 | (check_exp((size&(size-1))==0, (cast_int((s) & ((size)-1))))) |
611 | 611 | ||
612 | 612 | ||
613 | #define twoto(x) (1<<(x)) | 613 | #define twoto(x) (1<<(x)) |