diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-22 16:08:57 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-22 16:08:57 -0200 |
commit | bc930aa5ff75dcf4e560efac42d731d9e341fb1a (patch) | |
tree | ee7b0ffc34d4be3452da37d4e0bc04d2c17d9980 | |
parent | 67b44c9493c7eb1882a9a059b8b39ed350b5b635 (diff) | |
download | lua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.tar.gz lua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.tar.bz2 lua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.zip |
"free" usually handles NULL; handle non ANSI case separately.
-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.7 1998/06/29 22:03:06 roberto Exp $ | 2 | ** $Id: lmem.c,v 1.8 1999/01/22 17:28:00 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 | */ |
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #ifdef OLD_ANSI | 20 | #ifdef OLD_ANSI |
21 | #define realloc(b,s) ((b) == NULL ? malloc(s) : (realloc)(b, s)) | 21 | #define realloc(b,s) ((b) == NULL ? malloc(s) : (realloc)(b, s)) |
22 | #define free(b) if (b) (free)(b) | ||
22 | #endif | 23 | #endif |
23 | 24 | ||
24 | 25 | ||