diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.41 2007/04/10 12:17:52 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.42 2007/04/17 13:19:53 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 | */ |
@@ -996,16 +996,8 @@ static int testC (lua_State *L) { | |||
996 | } | 996 | } |
997 | else if EQ("getn") { | 997 | else if EQ("getn") { |
998 | int i = getindex; | 998 | int i = getindex; |
999 | lua_pushinteger(L1, luaL_getn(L1, i)); | 999 | lua_pushinteger(L1, lua_objlen(L1, i)); |
1000 | } | 1000 | } |
1001 | #ifndef luaL_setn | ||
1002 | else if EQ("setn") { | ||
1003 | int i = getindex; | ||
1004 | int n = cast_int(lua_tonumber(L1, -1)); | ||
1005 | luaL_setn(L1, i, n); | ||
1006 | lua_pop(L1, 1); | ||
1007 | } | ||
1008 | #endif | ||
1009 | else if EQ("throw") { | 1001 | else if EQ("throw") { |
1010 | #if defined(__cplusplus) | 1002 | #if defined(__cplusplus) |
1011 | static struct X { int x; } x; | 1003 | static struct X { int x; } x; |