diff options
Diffstat (limited to 'luamem.h')
-rw-r--r-- | luamem.h | 4 |
1 files changed, 3 insertions, 1 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: $ | 4 | ** $Id: mem.h,v 1.1 1994/11/16 17:38:08 roberto Stab roberto $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef mem_h | 7 | #ifndef mem_h |
@@ -15,6 +15,8 @@ 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 | |||
18 | #define new(s) ((s *)luaI_malloc(sizeof(s))) | 20 | #define new(s) ((s *)luaI_malloc(sizeof(s))) |
19 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) | 21 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) |
20 | #define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s))) | 22 | #define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s))) |