diff options
Diffstat (limited to 'lmem.h')
-rw-r--r-- | lmem.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.h,v 1.6 1998/12/15 14:59:43 roberto Exp roberto $ | 2 | ** $Id: lmem.h,v 1.7 1999/02/25 15:16:26 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 | */ |
@@ -16,6 +16,7 @@ | |||
16 | #define refEM "reference table overflow" | 16 | #define refEM "reference table overflow" |
17 | #define tableEM "table overflow" | 17 | #define tableEM "table overflow" |
18 | #define memEM "not enough memory" | 18 | #define memEM "not enough memory" |
19 | #define arrEM "internal array bigger than `int' limit" | ||
19 | 20 | ||
20 | void *luaM_realloc (void *oldblock, unsigned long size); | 21 | void *luaM_realloc (void *oldblock, unsigned long size); |
21 | void *luaM_growaux (void *block, unsigned long nelems, int inc, int size, | 22 | void *luaM_growaux (void *block, unsigned long nelems, int inc, int size, |
@@ -25,9 +26,9 @@ void *luaM_growaux (void *block, unsigned long nelems, int inc, int size, | |||
25 | #define luaM_malloc(t) luaM_realloc(NULL, (t)) | 26 | #define luaM_malloc(t) luaM_realloc(NULL, (t)) |
26 | #define luaM_new(t) ((t *)luaM_malloc(sizeof(t))) | 27 | #define luaM_new(t) ((t *)luaM_malloc(sizeof(t))) |
27 | #define luaM_newvector(n,t) ((t *)luaM_malloc((n)*sizeof(t))) | 28 | #define luaM_newvector(n,t) ((t *)luaM_malloc((n)*sizeof(t))) |
28 | #define luaM_growvector(old,nelems,inc,t,e,l) \ | 29 | #define luaM_growvector(v,nelems,inc,t,e,l) \ |
29 | ((t *)luaM_growaux(old,nelems,inc,sizeof(t),e,l)) | 30 | ((v)=(t *)luaM_growaux(v,nelems,inc,sizeof(t),e,l)) |
30 | #define luaM_reallocvector(v,n,t) ((t *)luaM_realloc(v,(n)*sizeof(t))) | 31 | #define luaM_reallocvector(v,n,t) ((v)=(t *)luaM_realloc(v,(n)*sizeof(t))) |
31 | 32 | ||
32 | 33 | ||
33 | #ifdef DEBUG | 34 | #ifdef DEBUG |