diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.19 2000/05/15 19:48:04 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.20 2000/05/22 18:44:46 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 | */ |
@@ -246,10 +246,6 @@ static void testC (lua_State *L) { | |||
246 | int n = getreg(L, &pc); | 246 | int n = getreg(L, &pc); |
247 | reg[n] = lua_getglobal(L, getname(&pc)); | 247 | reg[n] = lua_getglobal(L, getname(&pc)); |
248 | } | 248 | } |
249 | else if EQ("rawgetglobal") { | ||
250 | int n = getreg(L, &pc); | ||
251 | reg[n] = lua_rawgetglobal(L, getname(&pc)); | ||
252 | } | ||
253 | else if EQ("ref") { | 249 | else if EQ("ref") { |
254 | lua_pushnumber(L, lua_ref(L, 0)); | 250 | lua_pushnumber(L, lua_ref(L, 0)); |
255 | reg[getreg(L, &pc)] = lua_pop(L); | 251 | reg[getreg(L, &pc)] = lua_pop(L); |
@@ -276,8 +272,8 @@ static void testC (lua_State *L) { | |||
276 | else if EQ("setglobal") { | 272 | else if EQ("setglobal") { |
277 | lua_setglobal(L, getname(&pc)); | 273 | lua_setglobal(L, getname(&pc)); |
278 | } | 274 | } |
279 | else if EQ("rawsetglobal") { | 275 | else if EQ("pushglobals") { |
280 | lua_rawsetglobal(L, getname(&pc)); | 276 | lua_pushglobaltable(L); |
281 | } | 277 | } |
282 | else if EQ("pushstring") { | 278 | else if EQ("pushstring") { |
283 | lua_pushstring(L, getname(&pc)); | 279 | lua_pushstring(L, getname(&pc)); |
@@ -291,14 +287,14 @@ static void testC (lua_State *L) { | |||
291 | else if EQ("gettable") { | 287 | else if EQ("gettable") { |
292 | reg[getreg(L, &pc)] = lua_gettable(L); | 288 | reg[getreg(L, &pc)] = lua_gettable(L); |
293 | } | 289 | } |
294 | else if EQ("rawgettable") { | 290 | else if EQ("rawget") { |
295 | reg[getreg(L, &pc)] = lua_rawgettable(L); | 291 | reg[getreg(L, &pc)] = lua_rawget(L); |
296 | } | 292 | } |
297 | else if EQ("settable") { | 293 | else if EQ("settable") { |
298 | lua_settable(L); | 294 | lua_settable(L); |
299 | } | 295 | } |
300 | else if EQ("rawsettable") { | 296 | else if EQ("rawset") { |
301 | lua_rawsettable(L); | 297 | lua_rawset(L); |
302 | } | 298 | } |
303 | else if EQ("tag") { | 299 | else if EQ("tag") { |
304 | lua_pushnumber(L, lua_tag(L, reg[getreg(L, &pc)])); | 300 | lua_pushnumber(L, lua_tag(L, reg[getreg(L, &pc)])); |
@@ -360,6 +356,15 @@ static void testC (lua_State *L) { | |||
360 | while ((temp = lua_getresult(L1, i++)) != LUA_NOOBJECT) | 356 | while ((temp = lua_getresult(L1, i++)) != LUA_NOOBJECT) |
361 | lua_pushstring(L, lua_getstring(L1, temp)); | 357 | lua_pushstring(L, lua_getstring(L1, temp)); |
362 | } | 358 | } |
359 | #if LUA_DEPRECATETFUNCS | ||
360 | else if EQ("rawsetglobal") { | ||
361 | lua_rawsetglobal(L, getname(&pc)); | ||
362 | } | ||
363 | else if EQ("rawgetglobal") { | ||
364 | int n = getreg(L, &pc); | ||
365 | reg[n] = lua_rawgetglobal(L, getname(&pc)); | ||
366 | } | ||
367 | #endif | ||
363 | else luaL_verror(L, "unknown command in `testC': %.20s", inst); | 368 | else luaL_verror(L, "unknown command in `testC': %.20s", inst); |
364 | } | 369 | } |
365 | } | 370 | } |