diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-05-24 11:31:10 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-05-24 11:31:10 -0300 |
commit | f9deeac632ce1f6637bbfc1ccaddb08641082568 (patch) | |
tree | 79c4dfe5d9935ce0a50ec546140985aad0996147 /luamem.h | |
parent | 29f0021837b9e4f5624806e03ef493ec488ea114 (diff) | |
download | lua-f9deeac632ce1f6637bbfc1ccaddb08641082568.tar.gz lua-f9deeac632ce1f6637bbfc1ccaddb08641082568.tar.bz2 lua-f9deeac632ce1f6637bbfc1ccaddb08641082568.zip |
"luaI_malloc(s)" is just a macro to "luaI_realloc(NULL, s)".
Diffstat (limited to 'luamem.h')
-rw-r--r-- | luamem.h | 4 |
1 files changed, 2 insertions, 2 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.6 1996/03/21 18:54:29 roberto Exp roberto $ | 4 | ** $Id: mem.h,v 1.7 1996/04/22 18:00:37 roberto Exp roberto $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef mem_h | 7 | #ifndef mem_h |
@@ -24,12 +24,12 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | void luaI_free (void *block); | 26 | void luaI_free (void *block); |
27 | void *luaI_malloc (unsigned long size); | ||
28 | void *luaI_realloc (void *oldblock, unsigned long size); | 27 | void *luaI_realloc (void *oldblock, unsigned long size); |
29 | void *luaI_buffer (unsigned long size); | 28 | void *luaI_buffer (unsigned long size); |
30 | int luaI_growvector (void **block, unsigned long nelems, int size, | 29 | int luaI_growvector (void **block, unsigned long nelems, int size, |
31 | char *errormsg, unsigned long limit); | 30 | char *errormsg, unsigned long limit); |
32 | 31 | ||
32 | #define luaI_malloc(s) luaI_realloc(NULL, (s)) | ||
33 | #define new(s) ((s *)luaI_malloc(sizeof(s))) | 33 | #define new(s) ((s *)luaI_malloc(sizeof(s))) |
34 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) | 34 | #define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s))) |
35 | #define growvector(old,n,s,e,l) \ | 35 | #define growvector(old,n,s,e,l) \ |