diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-25 18:29:20 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-25 18:29:20 -0300 |
commit | f36038e42a1c6d4920ee01b31a59946b6df07a05 (patch) | |
tree | a22a46cdb38fdce183fad148e5863b58dd0ae736 /lmem.c | |
parent | 96e15b8501e5d8fc40c475cbac573f910ab5853b (diff) | |
download | lua-f36038e42a1c6d4920ee01b31a59946b6df07a05.tar.gz lua-f36038e42a1c6d4920ee01b31a59946b6df07a05.tar.bz2 lua-f36038e42a1c6d4920ee01b31a59946b6df07a05.zip |
assertion must be always valid (not only in debug mode)
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.57 2002/06/18 15:19:27 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.58 2002/10/08 18:45:07 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 | */ |
@@ -61,6 +61,7 @@ void *luaM_growaux (lua_State *L, void *block, int *size, int size_elems, | |||
61 | ** generic allocation routine. | 61 | ** generic allocation routine. |
62 | */ | 62 | */ |
63 | void *luaM_realloc (lua_State *L, void *block, lu_mem oldsize, lu_mem size) { | 63 | void *luaM_realloc (lua_State *L, void *block, lu_mem oldsize, lu_mem size) { |
64 | lua_assert((oldsize == 0) == (block == NULL)); | ||
64 | if (size == 0) { | 65 | if (size == 0) { |
65 | if (block != NULL) { | 66 | if (block != NULL) { |
66 | l_free(block, oldsize); | 67 | l_free(block, oldsize); |