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 /ltests.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 'ltests.c')
-rw-r--r-- | ltests.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.137 2002/10/22 18:07:55 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.138 2002/10/25 20:05:28 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -95,7 +95,6 @@ static void freeblock (void *block) { | |||
95 | 95 | ||
96 | 96 | ||
97 | void *debug_realloc (void *block, size_t oldsize, size_t size) { | 97 | void *debug_realloc (void *block, size_t oldsize, size_t size) { |
98 | lua_assert((oldsize == 0) == (block == NULL)); | ||
99 | lua_assert(oldsize == 0 || oldsize == *blocksize(block)); | 98 | lua_assert(oldsize == 0 || oldsize == *blocksize(block)); |
100 | /* ISO does not specify what realloc(NULL, 0) does */ | 99 | /* ISO does not specify what realloc(NULL, 0) does */ |
101 | lua_assert(block != NULL || size > 0); | 100 | lua_assert(block != NULL || size > 0); |