diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-19 11:20:30 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-19 11:20:30 -0200 |
commit | 4ac58853dc820127a11a14ed8bde1fae9458369e (patch) | |
tree | e8179692c97e935ba921c8ebd17abf9c8510d89e /lmem.c | |
parent | f2c451d7455aad3496f32dfa2bfca7f7e8b5376d (diff) | |
download | lua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.gz lua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.bz2 lua-4ac58853dc820127a11a14ed8bde1fae9458369e.zip |
thead-specific state separated from "global" state
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.41 2000/12/26 18:46:09 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.42 2000/12/28 12:55:41 roberto Exp roberto $ |
3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -161,9 +161,9 @@ void *luaM_realloc (lua_State *L, void *block, luint32 oldsize, luint32 size) { | |||
161 | else return NULL; /* error before creating state! */ | 161 | else return NULL; /* error before creating state! */ |
162 | } | 162 | } |
163 | } | 163 | } |
164 | if (L) { | 164 | if (L && G(L)) { |
165 | L->nblocks -= oldsize; | 165 | G(L)->nblocks -= oldsize; |
166 | L->nblocks += size; | 166 | G(L)->nblocks += size; |
167 | } | 167 | } |
168 | return block; | 168 | return block; |
169 | } | 169 | } |