diff options
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 1.116 2002/04/05 18:54:31 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.117 2002/04/24 20:07: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 | */ |
| @@ -383,7 +383,11 @@ static int udataval (lua_State *L) { | |||
| 383 | 383 | ||
| 384 | static int doonnewstack (lua_State *L) { | 384 | static int doonnewstack (lua_State *L) { |
| 385 | lua_State *L1 = lua_newthread(L); | 385 | lua_State *L1 = lua_newthread(L); |
| 386 | int status = lua_dostring(L1, luaL_check_string(L, 1)); | 386 | size_t l; |
| 387 | const char *s = luaL_check_lstr(L, 1, &l); | ||
| 388 | int status = lua_loadbuffer(L1, s, l, s); | ||
| 389 | if (status == 0) | ||
| 390 | status = lua_pcall(L1, 0, 0, 0); | ||
| 387 | lua_pushnumber(L, status); | 391 | lua_pushnumber(L, status); |
| 388 | lua_closethread(L, L1); | 392 | lua_closethread(L, L1); |
| 389 | return 1; | 393 | return 1; |
