diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:39:34 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:39:34 -0200 |
commit | 3a9ae612a4982e5f543baf8eead0889369eb8260 (patch) | |
tree | ff7388bce8d69a430eb1e88c6fc9a9c01da4db55 | |
parent | 9db693a57c07f22dc4d80e7b143a0d77c6229c05 (diff) | |
download | lua-3a9ae612a4982e5f543baf8eead0889369eb8260.tar.gz lua-3a9ae612a4982e5f543baf8eead0889369eb8260.tar.bz2 lua-3a9ae612a4982e5f543baf8eead0889369eb8260.zip |
macro 'ngcotouv' is the same as 'gco2uv', so it was removed
-rw-r--r-- | lfunc.c | 6 | ||||
-rw-r--r-- | lstate.h | 3 |
2 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lfunc.c,v 2.16 2009/09/30 15:38:37 roberto Exp roberto $ | 2 | ** $Id: lfunc.c,v 2.17 2009/11/26 11:39:20 roberto Exp roberto $ |
3 | ** Auxiliary functions to manipulate prototypes and closures | 3 | ** Auxiliary functions to manipulate prototypes and closures |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -56,7 +56,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
56 | GCObject **pp = &L->openupval; | 56 | GCObject **pp = &L->openupval; |
57 | UpVal *p; | 57 | UpVal *p; |
58 | UpVal *uv; | 58 | UpVal *uv; |
59 | while (*pp != NULL && (p = ngcotouv(*pp))->v >= level) { | 59 | while (*pp != NULL && (p = gco2uv(*pp))->v >= level) { |
60 | lua_assert(p->v != &p->u.value); | 60 | lua_assert(p->v != &p->u.value); |
61 | if (p->v == level) { /* found a corresponding upvalue? */ | 61 | if (p->v == level) { /* found a corresponding upvalue? */ |
62 | if (isdead(g, obj2gco(p))) /* is it dead? */ | 62 | if (isdead(g, obj2gco(p))) /* is it dead? */ |
@@ -97,7 +97,7 @@ void luaF_freeupval (lua_State *L, UpVal *uv) { | |||
97 | void luaF_close (lua_State *L, StkId level) { | 97 | void luaF_close (lua_State *L, StkId level) { |
98 | UpVal *uv; | 98 | UpVal *uv; |
99 | global_State *g = G(L); | 99 | global_State *g = G(L); |
100 | while (L->openupval != NULL && (uv = ngcotouv(L->openupval))->v >= level) { | 100 | while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) { |
101 | GCObject *o = obj2gco(uv); | 101 | GCObject *o = obj2gco(uv); |
102 | lua_assert(!isblack(o) && uv->v != &uv->u.value); | 102 | lua_assert(!isblack(o) && uv->v != &uv->u.value); |
103 | L->openupval = uv->next; /* remove from `open' list */ | 103 | L->openupval = uv->next; /* remove from `open' list */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.49 2009/11/25 15:27:51 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.50 2009/11/26 11:39:20 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -204,7 +204,6 @@ union GCObject { | |||
204 | #define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) | 204 | #define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) |
205 | #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) | 205 | #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) |
206 | #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) | 206 | #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) |
207 | #define ngcotouv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) | ||
208 | #define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) | 207 | #define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) |
209 | 208 | ||
210 | /* macro to convert any Lua object into a GCObject */ | 209 | /* macro to convert any Lua object into a GCObject */ |