diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-22 17:34:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-02-22 17:34:33 -0300 |
commit | 8c1a9899d4460aa19780919f4245c08d7ebba0e9 (patch) | |
tree | 685817907f64133330011eb7db845830c9327a3e /luamem.h | |
parent | 05caf09a36cadaab401bc9a24e29e2cd6e4126d4 (diff) | |
download | lua-8c1a9899d4460aa19780919f4245c08d7ebba0e9.tar.gz lua-8c1a9899d4460aa19780919f4245c08d7ebba0e9.tar.bz2 lua-8c1a9899d4460aa19780919f4245c08d7ebba0e9.zip |
functions "luaI_free" and "luaI_realloc" (or macro "growvector") may be
called with NULL.
Diffstat (limited to 'luamem.h')
-rw-r--r-- | luamem.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | ** mem.c | 2 | ** mem.c |
3 | ** memory manager for lua | 3 | ** memory manager for lua |
4 | ** $Id: mem.h,v 1.1 1994/11/16 17:38:08 roberto Stab roberto $ | 4 | ** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp roberto $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef mem_h | 7 | #ifndef mem_h |
@@ -15,8 +15,6 @@ void luaI_free (void *block); | |||
15 | void *luaI_malloc (unsigned long size); | 15 | void *luaI_malloc (unsigned long size); |
16 | void *luaI_realloc (void *oldblock, unsigned long size); | 16 | void *luaI_realloc (void *oldblock, unsigned long size); |
17 | 17 | ||
18 | char *luaI_strdup (char *str); | ||
19 | |||
20 | #define new(s) ((s *)luaI_malloc(sizeof(s))) | 18 | #define new(s) ((s *)luaI_malloc(sizeof(s))) |
21 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) | 19 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) |
22 | #define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s))) | 20 | #define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s))) |