From d119cf30350593caa4bebdc5c4e3123f3cd269e0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 30 Sep 2009 17:49:25 -0300 Subject: [PATCH] a few more instructions to testC (func2udata and getfield) --- ltests.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ltests.c b/ltests.c index 77677680..46730667 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.72 2009/09/17 18:04:21 roberto Exp roberto $ +** $Id: ltests.c,v 2.73 2009/09/28 16:32:50 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -916,6 +916,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { else if EQ("tocfunction") { lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); } + else if EQ("func2udata") { + lua_CFunction func = lua_tocfunction(L1, getindex); + lua_pushlightuserdata(L1, &func); + } else if EQ("return") { return getnum; } @@ -970,6 +974,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { else if EQ("gettable") { lua_gettable(L1, getindex); } + else if EQ("getfield") { + int t = getindex; + lua_getfield(L1, t, getname); + } else if EQ("rawgeti") { int t = getindex; lua_rawgeti(L1, t, getnum);