diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-20 18:59:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-20 18:59:13 -0300 |
| commit | 81102d368907bb5c0006d8630a7af683d6a353c5 (patch) | |
| tree | b2c0a013f075594b7754d9d026f22f8dc332e88b | |
| parent | 6579bd41909017d1223f5541c4d74f28430b2640 (diff) | |
| download | lua-81102d368907bb5c0006d8630a7af683d6a353c5.tar.gz lua-81102d368907bb5c0006d8630a7af683d6a353c5.tar.bz2 lua-81102d368907bb5c0006d8630a7af683d6a353c5.zip | |
try to avoid warnings when converting int to pointer
| -rw-r--r-- | ltests.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.137 2013/04/26 13:07:53 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.138 2013/05/07 19:01:16 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -810,7 +810,8 @@ static int newuserdata (lua_State *L) { | |||
| 810 | 810 | ||
| 811 | 811 | ||
| 812 | static int pushuserdata (lua_State *L) { | 812 | static int pushuserdata (lua_State *L) { |
| 813 | lua_pushlightuserdata(L, cast(void *, luaL_checkint(L, 1))); | 813 | lua_Integer u = luaL_checkinteger(L, 1); |
| 814 | lua_pushlightuserdata(L, cast(void *, cast(size_t, u))); | ||
| 814 | return 1; | 815 | return 1; |
| 815 | } | 816 | } |
| 816 | 817 | ||
