diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-09 14:34:35 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-09 14:34:35 -0300 |
| commit | b876ec61c03e05ea0c4c02d8ad8abb84cf55e87c (patch) | |
| tree | 62224cadfc7273beecb092f0e4a761e4c4f634e5 /lua.h | |
| parent | 898e8a67942186d62aa2cd3dc4ef96fe894788ef (diff) | |
| download | lua-b876ec61c03e05ea0c4c02d8ad8abb84cf55e87c.tar.gz lua-b876ec61c03e05ea0c4c02d8ad8abb84cf55e87c.tar.bz2 lua-b876ec61c03e05ea0c4c02d8ad8abb84cf55e87c.zip | |
new (temporary?) API for garbage collector
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 17 |
1 files changed, 12 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.185 2003/11/05 11:59:14 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.186 2003/12/10 11:04:54 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
| 5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
| @@ -221,11 +221,16 @@ LUA_API int lua_yield (lua_State *L, int nresults); | |||
| 221 | LUA_API int lua_resume (lua_State *L, int narg); | 221 | LUA_API int lua_resume (lua_State *L, int narg); |
| 222 | 222 | ||
| 223 | /* | 223 | /* |
| 224 | ** garbage-collection functions | 224 | ** garbage-collection function and options |
| 225 | */ | 225 | */ |
| 226 | LUA_API int lua_getgcthreshold (lua_State *L); | 226 | |
| 227 | LUA_API int lua_getgccount (lua_State *L); | 227 | #define LUA_GCSTOP 0 |
| 228 | LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); | 228 | #define LUA_GCRESTART 1 |
| 229 | #define LUA_GCCOLLECT 2 | ||
| 230 | #define LUA_GCCOUNT 3 | ||
| 231 | |||
| 232 | LUA_API int lua_gc (lua_State *L, int what, int data); | ||
| 233 | |||
| 229 | 234 | ||
| 230 | /* | 235 | /* |
| 231 | ** miscellaneous functions | 236 | ** miscellaneous functions |
| @@ -287,6 +292,8 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud); | |||
| 287 | 292 | ||
| 288 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) | 293 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) |
| 289 | 294 | ||
| 295 | #define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) | ||
| 296 | |||
| 290 | 297 | ||
| 291 | /* compatibility with ref system */ | 298 | /* compatibility with ref system */ |
| 292 | 299 | ||
