aboutsummaryrefslogtreecommitdiff
path: root/luamem.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-22 17:34:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-22 17:34:33 -0300
commit8c1a9899d4460aa19780919f4245c08d7ebba0e9 (patch)
tree685817907f64133330011eb7db845830c9327a3e /luamem.h
parent05caf09a36cadaab401bc9a24e29e2cd6e4126d4 (diff)
downloadlua-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.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/luamem.h b/luamem.h
index 168a09d0..06687efc 100644
--- a/luamem.h
+++ b/luamem.h
@@ -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);
15void *luaI_malloc (unsigned long size); 15void *luaI_malloc (unsigned long size);
16void *luaI_realloc (void *oldblock, unsigned long size); 16void *luaI_realloc (void *oldblock, unsigned long size);
17 17
18char *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)))