diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-14 10:15:54 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-14 10:15:54 -0300 |
| commit | 69ba1ac44188c8c067a300c3a47c94318ea99973 (patch) | |
| tree | 3e1b3f22b8873a48104818f9752b1e8fe3a1ea3a | |
| parent | 4a925c15521db16853a8d9b0ddc64c8313f17654 (diff) | |
| download | lua-69ba1ac44188c8c067a300c3a47c94318ea99973.tar.gz lua-69ba1ac44188c8c067a300c3a47c94318ea99973.tar.bz2 lua-69ba1ac44188c8c067a300c3a47c94318ea99973.zip | |
new "instruction" 'absindex'
| -rw-r--r-- | ltests.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.105 2010/05/10 18:24:36 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.106 2010/05/11 20:48:36 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 | */ |
| @@ -992,6 +992,9 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
| 992 | for (;;) { | 992 | for (;;) { |
| 993 | const char *inst = getstring; | 993 | const char *inst = getstring; |
| 994 | if EQ("") return 0; | 994 | if EQ("") return 0; |
| 995 | else if EQ("absindex") { | ||
| 996 | lua_pushnumber(L1, lua_absindex(L1, getindex)); | ||
| 997 | } | ||
| 995 | else if EQ("isnumber") { | 998 | else if EQ("isnumber") { |
| 996 | lua_pushboolean(L1, lua_isnumber(L1, getindex)); | 999 | lua_pushboolean(L1, lua_isnumber(L1, getindex)); |
| 997 | } | 1000 | } |
