aboutsummaryrefslogtreecommitdiff
path: root/luamem.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-05-24 11:31:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-05-24 11:31:10 -0300
commitf9deeac632ce1f6637bbfc1ccaddb08641082568 (patch)
tree79c4dfe5d9935ce0a50ec546140985aad0996147 /luamem.h
parent29f0021837b9e4f5624806e03ef493ec488ea114 (diff)
downloadlua-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/luamem.h b/luamem.h
index 29d3a708..cbc973b2 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.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
26void luaI_free (void *block); 26void luaI_free (void *block);
27void *luaI_malloc (unsigned long size);
28void *luaI_realloc (void *oldblock, unsigned long size); 27void *luaI_realloc (void *oldblock, unsigned long size);
29void *luaI_buffer (unsigned long size); 28void *luaI_buffer (unsigned long size);
30int luaI_growvector (void **block, unsigned long nelems, int size, 29int 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) \