From 237969724f54eeefee057ae382237c8db54af44e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Apr 2002 15:54:31 -0300 Subject: support for `light' userdata + simpler support for `boxed' udata --- ltests.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index b21ffc62..4893b312 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.114 2002/03/25 17:47:14 roberto Exp roberto $ +** $Id: ltests.c,v 1.115 2002/04/02 20:43:08 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -368,14 +368,14 @@ static int newuserdata (lua_State *L) { return 1; } -static int newuserdatabox (lua_State *L) { - lua_newuserdatabox(L, cast(void *, luaL_check_int(L, 1))); + +static int pushuserdata (lua_State *L) { + lua_pushudataval(L, cast(void *, luaL_check_int(L, 1))); return 1; } static int udataval (lua_State *L) { - luaL_check_type(L, 1, LUA_TUSERDATA); lua_pushnumber(L, cast(int, lua_touserdata(L, 1))); return 1; } @@ -662,7 +662,7 @@ static const struct luaL_reg tests_funcs[] = { {"s2d", s2d}, {"metatable", metatable}, {"newuserdata", newuserdata}, - {"newuserdatabox", newuserdatabox}, + {"pushuserdata", pushuserdata}, {"udataval", udataval}, {"doonnewstack", doonnewstack}, {"newstate", newstate}, -- cgit v1.2.3-55-g6feb