diff options
| -rw-r--r-- | ltests.c | 15 |
1 files changed, 11 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.192 2014/11/02 19:19:04 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.193 2014/11/07 18:07:17 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 | */ |
| @@ -1118,9 +1118,8 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
| 1118 | luaL_loadfile(L1, luaL_checkstring(L1, getnum)); | 1118 | luaL_loadfile(L1, luaL_checkstring(L1, getnum)); |
| 1119 | } | 1119 | } |
| 1120 | else if EQ("loadstring") { | 1120 | else if EQ("loadstring") { |
| 1121 | size_t sl; | 1121 | const char *s = luaL_checkstring(L1, getnum); |
| 1122 | const char *s = luaL_checklstring(L1, getnum, &sl); | 1122 | luaL_loadstring(L1, s); |
| 1123 | luaL_loadbuffer(L1, s, sl, s); | ||
| 1124 | } | 1123 | } |
| 1125 | else if EQ("newmetatable") { | 1124 | else if EQ("newmetatable") { |
| 1126 | lua_pushboolean(L1, luaL_newmetatable(L1, getstring)); | 1125 | lua_pushboolean(L1, luaL_newmetatable(L1, getstring)); |
| @@ -1201,6 +1200,14 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
| 1201 | int t = getindex; | 1200 | int t = getindex; |
| 1202 | lua_rawgeti(L1, t, getnum); | 1201 | lua_rawgeti(L1, t, getnum); |
| 1203 | } | 1202 | } |
| 1203 | else if EQ("rawgetp") { | ||
| 1204 | int t = getindex; | ||
| 1205 | lua_rawgetp(L1, t, cast(void *, cast(size_t, getnum))); | ||
| 1206 | } | ||
| 1207 | else if EQ("rawsetp") { | ||
| 1208 | int t = getindex; | ||
| 1209 | lua_rawsetp(L1, t, cast(void *, cast(size_t, getnum))); | ||
| 1210 | } | ||
| 1204 | else if EQ("remove") { | 1211 | else if EQ("remove") { |
| 1205 | lua_remove(L1, getnum); | 1212 | lua_remove(L1, getnum); |
| 1206 | } | 1213 | } |
