diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-26 10:47:05 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-26 10:47:05 -0200 |
commit | b892f0a8774f573d7ec9b02617428871b8d3a2b3 (patch) | |
tree | 4aab88443264d84d314ca663cf3c30b48c7e9107 /lgc.c | |
parent | aadc35449ec2752c298a7a8fa6359a3a12c538ee (diff) | |
download | lua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.tar.gz lua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.tar.bz2 lua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.zip |
new API function `createuserdata'
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 1.70 2000/10/05 12:14:08 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.71 2000/10/05 13:00:17 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -248,7 +248,7 @@ static void collectstrings (lua_State *L, int all) { | |||
248 | else { /* collect */ | 248 | else { /* collect */ |
249 | *p = next->nexthash; | 249 | *p = next->nexthash; |
250 | L->strt.nuse--; | 250 | L->strt.nuse--; |
251 | L->nblocks -= sizestring(next->u.s.len); | 251 | L->nblocks -= sizestring(next->len); |
252 | luaM_free(L, next); | 252 | luaM_free(L, next); |
253 | } | 253 | } |
254 | } | 254 | } |
@@ -273,7 +273,7 @@ static void collectudata (lua_State *L, int all) { | |||
273 | *p = next->nexthash; | 273 | *p = next->nexthash; |
274 | next->nexthash = L->TMtable[tag].collected; /* chain udata */ | 274 | next->nexthash = L->TMtable[tag].collected; /* chain udata */ |
275 | L->TMtable[tag].collected = next; | 275 | L->TMtable[tag].collected = next; |
276 | L->nblocks -= gcsizeudata; | 276 | L->nblocks -= sizestring(next->len); |
277 | L->udt.nuse--; | 277 | L->udt.nuse--; |
278 | } | 278 | } |
279 | } | 279 | } |