From c3a6f3fa1c6360d4ea2e32f9415f51e8e55093b4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 17 Dec 2009 14:20:01 -0200 Subject: 'lua_objlen' replaced by 'lua_rawlen', 'lua_len', and 'luaL_len' --- ltests.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 7114a175..57493695 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.83 2009/12/11 19:14:59 roberto Exp roberto $ +** $Id: ltests.c,v 2.84 2009/12/16 16:42:58 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -946,7 +946,13 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { lua_assert((s == NULL && s1 == NULL) || (strcmp)(s, s1) == 0); } else if EQ("objsize") { - lua_pushinteger(L1, lua_objlen(L1, getindex)); + lua_pushinteger(L1, lua_rawlen(L1, getindex)); + } + else if EQ("len") { + lua_len(L1, getindex); + } + else if EQ("Llen") { + lua_pushinteger(L1, luaL_len(L1, getindex)); } else if EQ("tocfunction") { lua_pushcfunction(L1, lua_tocfunction(L1, getindex)); @@ -1135,13 +1141,13 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { else if EQ("type") { lua_pushstring(L1, luaL_typename(L1, getnum)); } - else if EQ("getn") { +/* else if EQ("getn") { int i = getindex; lua_pushinteger(L1, lua_objlen(L1, i)); - } + } */ else if EQ("append") { int t = getindex; - int i = lua_objlen(L1, t); + int i = lua_rawlen(L1, t); lua_rawseti(L1, t, i + 1); } else if EQ("getctx") { -- cgit v1.2.3-55-g6feb