diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-09-17 15:04:21 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-09-17 15:04:21 -0300 |
| commit | 67cae2854cd2f90ff0cd91d641ab0b76417a1302 (patch) | |
| tree | 74e1c888e6cd0b80e98a2a7adc26fd1bbab97844 /ltests.c | |
| parent | 0e45ffb8e41fa8f6b156bdaff0685e1ddfdfbd2a (diff) | |
| download | lua-67cae2854cd2f90ff0cd91d641ab0b76417a1302.tar.gz lua-67cae2854cd2f90ff0cd91d641ab0b76417a1302.tar.bz2 lua-67cae2854cd2f90ff0cd91d641ab0b76417a1302.zip | |
'lua_mainthread' replaced by new preregistered value LUA_RIDX_MAINTHREAD
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.70 2009/09/09 20:44:10 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.71 2009/09/14 14:30:39 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 | */ |
| @@ -697,8 +697,6 @@ static int doonnewstack (lua_State *L) { | |||
| 697 | size_t l; | 697 | size_t l; |
| 698 | const char *s = luaL_checklstring(L, 1, &l); | 698 | const char *s = luaL_checklstring(L, 1, &l); |
| 699 | int status = luaL_loadbuffer(L1, s, l, s); | 699 | int status = luaL_loadbuffer(L1, s, l, s); |
| 700 | lua_State *ML = lua_mainthread(L1); | ||
| 701 | lua_assert(L1 != L && ML != L1 && lua_mainthread(L) == ML); | ||
| 702 | if (status == LUA_OK) | 700 | if (status == LUA_OK) |
| 703 | status = lua_pcall(L1, 0, 0, 0); | 701 | status = lua_pcall(L1, 0, 0, 0); |
| 704 | lua_pushinteger(L, status); | 702 | lua_pushinteger(L, status); |
| @@ -973,6 +971,10 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
| 973 | else if EQ("gettable") { | 971 | else if EQ("gettable") { |
| 974 | lua_gettable(L1, getindex); | 972 | lua_gettable(L1, getindex); |
| 975 | } | 973 | } |
| 974 | else if EQ("rawgeti") { | ||
| 975 | int t = getindex; | ||
| 976 | lua_rawgeti(L1, t, getnum); | ||
| 977 | } | ||
| 976 | else if EQ("settable") { | 978 | else if EQ("settable") { |
| 977 | lua_settable(L1, getindex); | 979 | lua_settable(L1, getindex); |
| 978 | } | 980 | } |
