summaryrefslogtreecommitdiff
path: root/src/mem.h
diff options
context:
space:
mode:
authorLua Team <team@lua.org>1995-02-07 12:00:00 +0000
committerrepogen <>1995-02-07 12:00:00 +0000
commita8b6ba0954edb9e0e669e1f451b9a8f145ce5166 (patch)
tree35e9e9999968c4f13a25a5f647203456f044274a /src/mem.h
parent944fc7d7d95575f2b8023c1f3d4ac19e1369fc76 (diff)
downloadlua-github-2.1.tar.gz
Lua 2.12.1
Diffstat (limited to 'src/mem.h')
-rw-r--r--src/mem.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mem.h b/src/mem.h
new file mode 100644
index 00000000..bae5b4d3
--- /dev/null
+++ b/src/mem.h
@@ -0,0 +1,25 @@
+/*
+** mem.c
+** memory manager for lua
+** $Id: mem.h,v 1.2 1995/01/13 22:11:12 roberto Exp $
+*/
+
+#ifndef mem_h
+#define mem_h
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+void luaI_free (void *block);
+void *luaI_malloc (unsigned long size);
+void *luaI_realloc (void *oldblock, unsigned long size);
+
+char *luaI_strdup (char *str);
+
+#define new(s) ((s *)luaI_malloc(sizeof(s)))
+#define newvector(n,s) ((s *)luaI_malloc((n)*sizeof(s)))
+#define growvector(old,n,s) ((s *)luaI_realloc(old,(n)*sizeof(s)))
+
+#endif
+