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 /lapi.c | |
parent | 89110986d7a9e81960261ae682780d5fd06dc4ac (diff) | |
download | lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.gz lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.tar.bz2 lua-e2b15aa21d2f31ccc93e35f50928e26a8d9c84ce.zip |
janitor work on casts
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.279 2017/12/08 17:28:25 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.280 2018/01/10 12:02:35 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -439,7 +439,7 @@ LUA_API const void *lua_topointer (lua_State *L, int idx) { | |||
439 | case LUA_TTABLE: return hvalue(o); | 439 | case LUA_TTABLE: return hvalue(o); |
440 | case LUA_TLCL: return clLvalue(o); | 440 | case LUA_TLCL: return clLvalue(o); |
441 | case LUA_TCCL: return clCvalue(o); | 441 | case LUA_TCCL: return clCvalue(o); |
442 | case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o))); | 442 | case LUA_TLCF: return cast_voidp(cast_sizet(fvalue(o))); |
443 | case LUA_TTHREAD: return thvalue(o); | 443 | case LUA_TTHREAD: return thvalue(o); |
444 | case LUA_TUSERDATA: return getudatamem(uvalue(o)); | 444 | case LUA_TUSERDATA: return getudatamem(uvalue(o)); |
445 | case LUA_TLIGHTUSERDATA: return pvalue(o); | 445 | case LUA_TLIGHTUSERDATA: return pvalue(o); |
@@ -685,7 +685,7 @@ LUA_API int lua_rawgetp (lua_State *L, int idx, const void *p) { | |||
685 | lua_lock(L); | 685 | lua_lock(L); |
686 | t = index2value(L, idx); | 686 | t = index2value(L, idx); |
687 | api_check(L, ttistable(t), "table expected"); | 687 | api_check(L, ttistable(t), "table expected"); |
688 | setpvalue(&k, cast(void *, p)); | 688 | setpvalue(&k, cast_voidp(p)); |
689 | setobj2s(L, L->top, luaH_get(hvalue(t), &k)); | 689 | setobj2s(L, L->top, luaH_get(hvalue(t), &k)); |
690 | api_incr_top(L); | 690 | api_incr_top(L); |
691 | lua_unlock(L); | 691 | lua_unlock(L); |
@@ -854,7 +854,7 @@ LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) { | |||
854 | api_checknelems(L, 1); | 854 | api_checknelems(L, 1); |
855 | o = index2value(L, idx); | 855 | o = index2value(L, idx); |
856 | api_check(L, ttistable(o), "table expected"); | 856 | api_check(L, ttistable(o), "table expected"); |
857 | setpvalue(&k, cast(void *, p)); | 857 | setpvalue(&k, cast_voidp(p)); |
858 | slot = luaH_set(L, hvalue(o), &k); | 858 | slot = luaH_set(L, hvalue(o), &k); |
859 | setobj2t(L, slot, s2v(L->top - 1)); | 859 | setobj2t(L, slot, s2v(L->top - 1)); |
860 | luaC_barrierback(L, hvalue(o), s2v(L->top - 1)); | 860 | luaC_barrierback(L, hvalue(o), s2v(L->top - 1)); |