diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.114 2002/03/25 17:47:14 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.115 2002/04/02 20:43:08 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 | */ |
@@ -368,14 +368,14 @@ static int newuserdata (lua_State *L) { | |||
368 | return 1; | 368 | return 1; |
369 | } | 369 | } |
370 | 370 | ||
371 | static int newuserdatabox (lua_State *L) { | 371 | |
372 | lua_newuserdatabox(L, cast(void *, luaL_check_int(L, 1))); | 372 | static int pushuserdata (lua_State *L) { |
373 | lua_pushudataval(L, cast(void *, luaL_check_int(L, 1))); | ||
373 | return 1; | 374 | return 1; |
374 | } | 375 | } |
375 | 376 | ||
376 | 377 | ||
377 | static int udataval (lua_State *L) { | 378 | static int udataval (lua_State *L) { |
378 | luaL_check_type(L, 1, LUA_TUSERDATA); | ||
379 | lua_pushnumber(L, cast(int, lua_touserdata(L, 1))); | 379 | lua_pushnumber(L, cast(int, lua_touserdata(L, 1))); |
380 | return 1; | 380 | return 1; |
381 | } | 381 | } |
@@ -662,7 +662,7 @@ static const struct luaL_reg tests_funcs[] = { | |||
662 | {"s2d", s2d}, | 662 | {"s2d", s2d}, |
663 | {"metatable", metatable}, | 663 | {"metatable", metatable}, |
664 | {"newuserdata", newuserdata}, | 664 | {"newuserdata", newuserdata}, |
665 | {"newuserdatabox", newuserdatabox}, | 665 | {"pushuserdata", pushuserdata}, |
666 | {"udataval", udataval}, | 666 | {"udataval", udataval}, |
667 | {"doonnewstack", doonnewstack}, | 667 | {"doonnewstack", doonnewstack}, |
668 | {"newstate", newstate}, | 668 | {"newstate", newstate}, |