aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-02-20 17:12:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-02-20 17:12:39 -0300
commit67f9a2a98f245f3468f1671bb1f51ffabb4581be (patch)
treefa3453c1c6f8fe00f6c327e277a02ea72ebb8138 /lapi.c
parentc4f9c887fc8dc514b9de30ce395517caad973246 (diff)
downloadlua-67f9a2a98f245f3468f1671bb1f51ffabb4581be.tar.gz
lua-67f9a2a98f245f3468f1671bb1f51ffabb4581be.tar.bz2
lua-67f9a2a98f245f3468f1671bb1f51ffabb4581be.zip
details
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lapi.c b/lapi.c
index 7114d1e5..74df3410 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.228 2003/02/11 10:46:24 roberto Exp roberto $ 2** $Id: lapi.c,v 1.229 2003/02/18 16:13:15 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -755,7 +755,7 @@ LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data) {
755/* GC values are expressed in Kbytes: #bytes/2^10 */ 755/* GC values are expressed in Kbytes: #bytes/2^10 */
756#define GCscalel(x) ((x)>>10) 756#define GCscalel(x) ((x)>>10)
757#define GCscale(x) (cast(int, GCscalel(x))) 757#define GCscale(x) (cast(int, GCscalel(x)))
758#define GCunscale(x) (cast(lu_mem, (x)<<10)) 758#define GCunscale(x) (cast(lu_mem, x)<<10)
759 759
760LUA_API int lua_getgcthreshold (lua_State *L) { 760LUA_API int lua_getgcthreshold (lua_State *L) {
761 int threshold; 761 int threshold;
@@ -775,8 +775,8 @@ LUA_API int lua_getgccount (lua_State *L) {
775 775
776LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold) { 776LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold) {
777 lua_lock(L); 777 lua_lock(L);
778 if (cast(lu_mem, newthreshold) > GCscalel(ULONG_MAX)) 778 if (cast(lu_mem, newthreshold) > GCscalel(MAX_LUMEM))
779 G(L)->GCthreshold = ULONG_MAX; 779 G(L)->GCthreshold = MAX_LUMEM;
780 else 780 else
781 G(L)->GCthreshold = GCunscale(newthreshold); 781 G(L)->GCthreshold = GCunscale(newthreshold);
782 luaC_checkGC(L); 782 luaC_checkGC(L);