summaryrefslogtreecommitdiff
path: root/luamem.h
diff options
context:
space:
mode:
Diffstat (limited to 'luamem.h')
-rw-r--r--luamem.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/luamem.h b/luamem.h
new file mode 100644
index 00000000..c75dd211
--- /dev/null
+++ b/luamem.h
@@ -0,0 +1,23 @@
1/*
2** mem.c
3** memory manager for lua
4** $Id: $
5*/
6
7#ifndef mem_h
8#define mem_h
9
10#ifndef NULL
11#define NULL 0
12#endif
13
14void luaI_free (void *block);
15void *luaI_malloc (unsigned long size);
16void *luaI_realloc (void *oldblock, unsigned long size);
17
18#define new(s) ((s *)luaI_malloc(sizeof(s)))
19#define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
20#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s)))
21
22#endif
23