diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -164,7 +164,7 @@ typedef union Header { | |||
164 | 164 | ||
165 | 165 | ||
166 | Memcontrol l_memcontrol = | 166 | Memcontrol l_memcontrol = |
167 | {0L, 0L, 0L, 0L, (~0L), {0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L}}; | 167 | {0UL, 0UL, 0UL, 0UL, (~0UL), {0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL}}; |
168 | 168 | ||
169 | 169 | ||
170 | static void freeblock (Memcontrol *mc, Header *block) { | 170 | static void freeblock (Memcontrol *mc, Header *block) { |
@@ -1596,7 +1596,10 @@ static struct X { int x; } x; | |||
1596 | lua_pushnumber(L1, lua_tonumber(L1, getindex)); | 1596 | lua_pushnumber(L1, lua_tonumber(L1, getindex)); |
1597 | } | 1597 | } |
1598 | else if EQ("topointer") { | 1598 | else if EQ("topointer") { |
1599 | lua_pushnumber(L1, cast_sizet(lua_topointer(L1, getindex))); | 1599 | lua_pushlightuserdata(L1, cast_voidp(lua_topointer(L1, getindex))); |
1600 | } | ||
1601 | else if EQ("touserdata") { | ||
1602 | lua_pushlightuserdata(L1, lua_touserdata(L1, getindex)); | ||
1600 | } | 1603 | } |
1601 | else if EQ("tostring") { | 1604 | else if EQ("tostring") { |
1602 | const char *s = lua_tostring(L1, getindex); | 1605 | const char *s = lua_tostring(L1, getindex); |