diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.37 2000/08/29 19:05:11 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.38 2000/08/31 13:29:47 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 | */ |
@@ -341,7 +341,7 @@ static int getnum (lua_State *L, const char **pc) { | |||
341 | skip(pc); | 341 | skip(pc); |
342 | if (**pc == '.') { | 342 | if (**pc == '.') { |
343 | res = (int)lua_tonumber(L, -1); | 343 | res = (int)lua_tonumber(L, -1); |
344 | lua_settop(L, -1); | 344 | lua_pop(L, 1); |
345 | (*pc)++; | 345 | (*pc)++; |
346 | return res; | 346 | return res; |
347 | } | 347 | } |
@@ -384,12 +384,21 @@ static int testC (lua_State *L) { | |||
384 | else if EQ("settop") { | 384 | else if EQ("settop") { |
385 | lua_settop(L, getnum); | 385 | lua_settop(L, getnum); |
386 | } | 386 | } |
387 | else if EQ("pop") { | ||
388 | lua_pop(L, getnum); | ||
389 | } | ||
387 | else if EQ("pushnum") { | 390 | else if EQ("pushnum") { |
388 | lua_pushnumber(L, getnum); | 391 | lua_pushnumber(L, getnum); |
389 | } | 392 | } |
390 | else if EQ("pushobject") { | 393 | else if EQ("pushobject") { |
391 | lua_pushobject(L, getnum); | 394 | lua_pushobject(L, getnum); |
392 | } | 395 | } |
396 | else if EQ("move") { | ||
397 | lua_move(L, getnum); | ||
398 | } | ||
399 | else if EQ("insert") { | ||
400 | lua_insert(L, getnum); | ||
401 | } | ||
393 | else if EQ("next") { | 402 | else if EQ("next") { |
394 | lua_next(L); | 403 | lua_next(L); |
395 | } | 404 | } |