diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -378,9 +378,9 @@ static int udataval (lua_State *L) { | |||
378 | 378 | ||
379 | 379 | ||
380 | static int doonnewstack (lua_State *L) { | 380 | static int doonnewstack (lua_State *L) { |
381 | lua_State *L1 = lua_newthread(L, luaL_check_int(L, 1)); | 381 | lua_State *L1 = lua_newthread(L); |
382 | lua_dostring(L1, luaL_check_string(L, 2)); | 382 | int status = lua_dostring(L1, luaL_check_string(L, 1)); |
383 | lua_pushnumber(L, 1); | 383 | lua_pushnumber(L, status); |
384 | lua_closethread(L, L1); | 384 | lua_closethread(L, L1); |
385 | return 1; | 385 | return 1; |
386 | } | 386 | } |
@@ -399,7 +399,7 @@ static int d2s (lua_State *L) { | |||
399 | 399 | ||
400 | 400 | ||
401 | static int newstate (lua_State *L) { | 401 | static int newstate (lua_State *L) { |
402 | lua_State *L1 = lua_open(luaL_check_int(L, 1)); | 402 | lua_State *L1 = lua_open(); |
403 | if (L1) { | 403 | if (L1) { |
404 | *cast(int **, L1) = &islocked; /* initialize the lock */ | 404 | *cast(int **, L1) = &islocked; /* initialize the lock */ |
405 | lua_pushnumber(L, (unsigned long)L1); | 405 | lua_pushnumber(L, (unsigned long)L1); |