aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-01-22 16:08:57 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-01-22 16:08:57 -0200
commitbc930aa5ff75dcf4e560efac42d731d9e341fb1a (patch)
treeee7b0ffc34d4be3452da37d4e0bc04d2c17d9980
parent67b44c9493c7eb1882a9a059b8b39ed350b5b635 (diff)
downloadlua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.tar.gz
lua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.tar.bz2
lua-bc930aa5ff75dcf4e560efac42d731d9e341fb1a.zip
"free" usually handles NULL; handle non ANSI case separately.
-rw-r--r--lmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lmem.c b/lmem.c
index a2cd11fd..ccf1a4a8 100644
--- a/lmem.c
+++ b/lmem.c
@@ -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