1997-09-16 23:25:59 +04:00
|
|
|
/*
|
2003-02-28 22:45:15 +03:00
|
|
|
** $Id: lgc.h,v 1.18 2003/02/10 17:32:50 roberto Exp roberto $
|
1997-09-16 23:25:59 +04:00
|
|
|
** Garbage Collector
|
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef lgc_h
|
|
|
|
#define lgc_h
|
|
|
|
|
|
|
|
|
|
|
|
#include "lobject.h"
|
|
|
|
|
|
|
|
|
2003-02-28 22:45:15 +03:00
|
|
|
#define luaC_checkGC(L) { lua_assert(!(L->ci->state & CI_CALLING)); \
|
|
|
|
if (G(L)->nblocks >= G(L)->GCthreshold) luaC_collectgarbage(L); }
|
2001-06-05 23:41:24 +04:00
|
|
|
|
|
|
|
|
2003-02-10 20:32:50 +03:00
|
|
|
void luaC_separateudata (lua_State *L);
|
|
|
|
void luaC_callGCTM (lua_State *L);
|
2002-08-17 00:00:28 +04:00
|
|
|
void luaC_sweep (lua_State *L, int all);
|
2001-02-02 19:23:20 +03:00
|
|
|
void luaC_collectgarbage (lua_State *L);
|
2002-11-25 15:38:47 +03:00
|
|
|
void luaC_link (lua_State *L, GCObject *o, lu_byte tt);
|
1997-09-16 23:25:59 +04:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|