diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.83 2009/12/11 19:14:59 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.84 2009/12/16 16:42:58 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 | */ |
@@ -946,7 +946,13 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
946 | lua_assert((s == NULL && s1 == NULL) || (strcmp)(s, s1) == 0); | 946 | lua_assert((s == NULL && s1 == NULL) || (strcmp)(s, s1) == 0); |
947 | } | 947 | } |
948 | else if EQ("objsize") { | 948 | else if EQ("objsize") { |
949 | lua_pushinteger(L1, lua_objlen(L1, getindex)); | 949 | lua_pushinteger(L1, lua_rawlen(L1, getindex)); |
950 | } | ||
951 | else if EQ("len") { | ||
952 | lua_len(L1, getindex); | ||
953 | } | ||
954 | else if EQ("Llen") { | ||
955 | lua_pushinteger(L1, luaL_len(L1, getindex)); | ||
950 | } | 956 | } |
951 | else if EQ("tocfunction") { | 957 | else if EQ("tocfunction") { |
952 | lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); | 958 | lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); |
@@ -1135,13 +1141,13 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1135 | else if EQ("type") { | 1141 | else if EQ("type") { |
1136 | lua_pushstring(L1, luaL_typename(L1, getnum)); | 1142 | lua_pushstring(L1, luaL_typename(L1, getnum)); |
1137 | } | 1143 | } |
1138 | else if EQ("getn") { | 1144 | /* else if EQ("getn") { |
1139 | int i = getindex; | 1145 | int i = getindex; |
1140 | lua_pushinteger(L1, lua_objlen(L1, i)); | 1146 | lua_pushinteger(L1, lua_objlen(L1, i)); |
1141 | } | 1147 | } */ |
1142 | else if EQ("append") { | 1148 | else if EQ("append") { |
1143 | int t = getindex; | 1149 | int t = getindex; |
1144 | int i = lua_objlen(L1, t); | 1150 | int i = lua_rawlen(L1, t); |
1145 | lua_rawseti(L1, t, i + 1); | 1151 | lua_rawseti(L1, t, i + 1); |
1146 | } | 1152 | } |
1147 | else if EQ("getctx") { | 1153 | else if EQ("getctx") { |