diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-09-30 17:49:25 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-09-30 17:49:25 -0300 |
commit | d119cf30350593caa4bebdc5c4e3123f3cd269e0 (patch) | |
tree | 5f8c4c8e26743bc7241463d8e3dcb0bbcae1bb95 | |
parent | 0ac3d07ea64ce4bcb8b935fb80fbb2b72d6b8f43 (diff) | |
download | lua-d119cf30350593caa4bebdc5c4e3123f3cd269e0.tar.gz lua-d119cf30350593caa4bebdc5c4e3123f3cd269e0.tar.bz2 lua-d119cf30350593caa4bebdc5c4e3123f3cd269e0.zip |
a few more instructions to testC (func2udata and getfield)
-rw-r--r-- | ltests.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.72 2009/09/17 18:04:21 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.73 2009/09/28 16:32:50 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 | */ |
@@ -916,6 +916,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
916 | else if EQ("tocfunction") { | 916 | else if EQ("tocfunction") { |
917 | lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); | 917 | lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); |
918 | } | 918 | } |
919 | else if EQ("func2udata") { | ||
920 | lua_CFunction func = lua_tocfunction(L1, getindex); | ||
921 | lua_pushlightuserdata(L1, &func); | ||
922 | } | ||
919 | else if EQ("return") { | 923 | else if EQ("return") { |
920 | return getnum; | 924 | return getnum; |
921 | } | 925 | } |
@@ -970,6 +974,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
970 | else if EQ("gettable") { | 974 | else if EQ("gettable") { |
971 | lua_gettable(L1, getindex); | 975 | lua_gettable(L1, getindex); |
972 | } | 976 | } |
977 | else if EQ("getfield") { | ||
978 | int t = getindex; | ||
979 | lua_getfield(L1, t, getname); | ||
980 | } | ||
973 | else if EQ("rawgeti") { | 981 | else if EQ("rawgeti") { |
974 | int t = getindex; | 982 | int t = getindex; |
975 | lua_rawgeti(L1, t, getnum); | 983 | lua_rawgeti(L1, t, getnum); |