1999-10-04 21:50:24 +04:00
|
|
|
/*
|
2000-02-08 19:39:42 +03:00
|
|
|
** $Id: lref.h,v 1.5 1999/12/27 17:33:22 roberto Exp roberto $
|
1999-12-27 20:33:22 +03:00
|
|
|
** reference mechanism
|
1999-10-04 21:50:24 +04:00
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lref_h
|
|
|
|
#define lref_h
|
|
|
|
|
|
|
|
#include "lobject.h"
|
|
|
|
|
1999-11-10 18:37:50 +03:00
|
|
|
|
|
|
|
#define NONEXT -1 /* to end the free list */
|
|
|
|
#define HOLD -2
|
|
|
|
#define COLLECTED -3
|
|
|
|
#define LOCK -4
|
|
|
|
|
|
|
|
|
2000-02-08 19:39:42 +03:00
|
|
|
struct Ref {
|
1999-11-10 18:37:50 +03:00
|
|
|
TObject o;
|
|
|
|
int st; /* can be LOCK, HOLD, COLLECTED, or next (for free list) */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-11-22 16:12:07 +03:00
|
|
|
void luaR_invalidaterefs (lua_State *L);
|
1999-10-04 21:50:24 +04:00
|
|
|
|
|
|
|
#endif
|