aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 3edd8050..39f1544e 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.89 2002/07/01 19:23:58 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.90 2002/07/04 17:58:02 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -310,7 +310,7 @@ static int luaB_tostring (lua_State *L) {
310 sprintf(buff, "function: %p", lua_topointer(L, 1)); 310 sprintf(buff, "function: %p", lua_topointer(L, 1));
311 break; 311 break;
312 case LUA_TUSERDATA: 312 case LUA_TUSERDATA:
313 case LUA_TUDATAVAL: 313 case LUA_TLIGHTUSERDATA:
314 sprintf(buff, "userdata: %p", lua_touserdata(L, 1)); 314 sprintf(buff, "userdata: %p", lua_touserdata(L, 1));
315 break; 315 break;
316 case LUA_TNIL: 316 case LUA_TNIL:
@@ -484,7 +484,7 @@ static const luaL_reg base_funcs[] = {
484 484
485 485
486static int luaB_resume (lua_State *L) { 486static int luaB_resume (lua_State *L) {
487 lua_State *co = (lua_State *)lua_getfrombox(L, lua_upvalueindex(1)); 487 lua_State *co = (lua_State *)lua_unboxpointer(L, lua_upvalueindex(1));
488 int status; 488 int status;
489 lua_settop(L, 0); 489 lua_settop(L, 0);
490 status = lua_resume(L, co); 490 status = lua_resume(L, co);
@@ -503,7 +503,7 @@ static int luaB_resume (lua_State *L) {
503 503
504 504
505static int gc_coroutine (lua_State *L) { 505static int gc_coroutine (lua_State *L) {
506 lua_State *co = (lua_State *)lua_getfrombox(L, 1); 506 lua_State *co = (lua_State *)lua_unboxpointer(L, 1);
507 lua_closethread(L, co); 507 lua_closethread(L, co);
508 return 0; 508 return 0;
509} 509}
@@ -526,7 +526,7 @@ static int luaB_coroutine (lua_State *L) {
526 lua_unref(L, ref); 526 lua_unref(L, ref);
527 } 527 }
528 lua_cobegin(NL, n-1); 528 lua_cobegin(NL, n-1);
529 lua_newpointerbox(L, NL); 529 lua_boxpointer(L, NL);
530 lua_pushliteral(L, "Coroutine"); 530 lua_pushliteral(L, "Coroutine");
531 lua_rawget(L, LUA_REGISTRYINDEX); 531 lua_rawget(L, LUA_REGISTRYINDEX);
532 lua_setmetatable(L, -2); 532 lua_setmetatable(L, -2);