diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-17 13:25:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-07-17 13:25:13 -0300 |
| commit | 79c8edb6c423b48270c1f61df6fd5a889ca5da0e (patch) | |
| tree | 1b79c096472f5f799f5576561e831b0d992c8cd0 /lbaselib.c | |
| parent | e5146fb01f1ccb40c2663e745feffbf642cbf862 (diff) | |
| download | lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.tar.gz lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.tar.bz2 lua-79c8edb6c423b48270c1f61df6fd5a889ca5da0e.zip | |
new names for light userdata operations
Diffstat (limited to 'lbaselib.c')
| -rw-r--r-- | lbaselib.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -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 | ||
| 486 | static int luaB_resume (lua_State *L) { | 486 | static 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 | ||
| 505 | static int gc_coroutine (lua_State *L) { | 505 | static 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); |
