aboutsummaryrefslogtreecommitdiff
path: root/lmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'lmem.h')
-rw-r--r--lmem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lmem.h b/lmem.h
index 4741b7f6..c8e015d6 100644
--- a/lmem.h
+++ b/lmem.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmem.h,v 1.5 1997/12/17 20:48:58 roberto Exp roberto $ 2** $Id: lmem.h,v 1.6 1998/12/15 14:59:43 roberto Exp roberto $
3** Interface to Memory Manager 3** Interface to Memory Manager
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -18,15 +18,15 @@
18#define memEM "not enough memory" 18#define memEM "not enough memory"
19 19
20void *luaM_realloc (void *oldblock, unsigned long size); 20void *luaM_realloc (void *oldblock, unsigned long size);
21int luaM_growaux (void **block, unsigned long nelems, int size, 21void *luaM_growaux (void *block, unsigned long nelems, int inc, int size,
22 char *errormsg, unsigned long limit); 22 char *errormsg, unsigned long limit);
23 23
24#define luaM_free(b) luaM_realloc((b), 0) 24#define luaM_free(b) luaM_realloc((b), 0)
25#define luaM_malloc(t) luaM_realloc(NULL, (t)) 25#define luaM_malloc(t) luaM_realloc(NULL, (t))
26#define luaM_new(t) ((t *)luaM_malloc(sizeof(t))) 26#define luaM_new(t) ((t *)luaM_malloc(sizeof(t)))
27#define luaM_newvector(n,t) ((t *)luaM_malloc((n)*sizeof(t))) 27#define luaM_newvector(n,t) ((t *)luaM_malloc((n)*sizeof(t)))
28#define luaM_growvector(old,n,t,e,l) \ 28#define luaM_growvector(old,nelems,inc,t,e,l) \
29 (luaM_growaux((void**)old,n,sizeof(t),e,l)) 29 ((t *)luaM_growaux(old,nelems,inc,sizeof(t),e,l))
30#define luaM_reallocvector(v,n,t) ((t *)luaM_realloc(v,(n)*sizeof(t))) 30#define luaM_reallocvector(v,n,t) ((t *)luaM_realloc(v,(n)*sizeof(t)))
31 31
32 32