lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d119cf30350593caa4bebdc5c4e3123f3cd269e0
parent 0ac3d07ea64ce4bcb8b935fb80fbb2b72d6b8f43
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 30 Sep 2009 17:49:01 -0300

a few more instructions to testC (func2udata and getfield)

Diffstat:
Mltests.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 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);