aboutsummaryrefslogtreecommitdiff
path: root/lref.h
blob: 180daab00a004c68ea54c480eea4dcf0808dbbf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
** $Id: lref.h,v 1.1 1999/10/04 17:50:24 roberto Exp roberto $
** REF mechanism
** See Copyright Notice in lua.h
*/

#ifndef lref_h
#define lref_h

#include "lobject.h"


#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) */
};


int luaR_ref (const TObject *o, int lock);
const TObject *luaR_getref (int ref);
void luaR_invalidaterefs (void);


#endif