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