aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-28 10:55:41 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-28 10:55:41 -0200
commit0183b8030c80f57b87874ff7867ccdb172d9d3dc (patch)
tree1033b5a84489a2f1f1bd210b1b120155cd7aeed7 /lapi.c
parent8c49e198654567f770a7d5081b886a7c35201d81 (diff)
downloadlua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.tar.gz
lua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.tar.bz2
lua-0183b8030c80f57b87874ff7867ccdb172d9d3dc.zip
`free' gets size of the block: complete control over memory use
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index b1b7d0ff..661d5ba5 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.112 2000/12/04 18:33:40 roberto Exp roberto $ 2** $Id: lapi.c,v 1.113 2000/12/26 18:46:09 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*/
@@ -362,7 +362,6 @@ LUA_API int lua_ref (lua_State *L, int lock) {
362 else { /* no more free places */ 362 else { /* no more free places */
363 luaM_growvector(L, L->refArray, L->nref, L->sizeref, struct Ref, 363 luaM_growvector(L, L->refArray, L->nref, L->sizeref, struct Ref,
364 MAX_INT, "reference table overflow"); 364 MAX_INT, "reference table overflow");
365 L->nblocks += sizeof(struct Ref);
366 ref = L->nref++; 365 ref = L->nref++;
367 } 366 }
368 L->refArray[ref].o = *(L->top-1); 367 L->refArray[ref].o = *(L->top-1);