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