mirror of https://github.com/lua/lua
macro 'ngcotouv' is the same as 'gco2uv', so it was removed
This commit is contained in:
parent
9db693a57c
commit
3a9ae612a4
6
lfunc.c
6
lfunc.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lfunc.c,v 2.16 2009/09/30 15:38:37 roberto Exp roberto $
|
||||
** $Id: lfunc.c,v 2.17 2009/11/26 11:39:20 roberto Exp roberto $
|
||||
** Auxiliary functions to manipulate prototypes and closures
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -56,7 +56,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
|
|||
GCObject **pp = &L->openupval;
|
||||
UpVal *p;
|
||||
UpVal *uv;
|
||||
while (*pp != NULL && (p = ngcotouv(*pp))->v >= level) {
|
||||
while (*pp != NULL && (p = gco2uv(*pp))->v >= level) {
|
||||
lua_assert(p->v != &p->u.value);
|
||||
if (p->v == level) { /* found a corresponding upvalue? */
|
||||
if (isdead(g, obj2gco(p))) /* is it dead? */
|
||||
|
@ -97,7 +97,7 @@ void luaF_freeupval (lua_State *L, UpVal *uv) {
|
|||
void luaF_close (lua_State *L, StkId level) {
|
||||
UpVal *uv;
|
||||
global_State *g = G(L);
|
||||
while (L->openupval != NULL && (uv = ngcotouv(L->openupval))->v >= level) {
|
||||
while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) {
|
||||
GCObject *o = obj2gco(uv);
|
||||
lua_assert(!isblack(o) && uv->v != &uv->u.value);
|
||||
L->openupval = uv->next; /* remove from `open' list */
|
||||
|
|
3
lstate.h
3
lstate.h
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lstate.h,v 2.49 2009/11/25 15:27:51 roberto Exp roberto $
|
||||
** $Id: lstate.h,v 2.50 2009/11/26 11:39:20 roberto Exp roberto $
|
||||
** Global State
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -204,7 +204,6 @@ union GCObject {
|
|||
#define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
|
||||
#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
|
||||
#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
|
||||
#define ngcotouv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
|
||||
#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
|
||||
|
||||
/* macro to convert any Lua object into a GCObject */
|
||||
|
|
Loading…
Reference in New Issue