From b97fb932ece7872a8d1dd6c0a2c88f3ce33e9741 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 2 Oct 2003 17:31:17 -0300
Subject: Lua kernel does not use malloc/free functions.

---
 lua.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'lua.h')

diff --git a/lua.h b/lua.h
index 8285c555..abea10af 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
 /*
-** $Id: lua.h,v 1.177 2003/05/15 12:20:04 roberto Exp roberto $
+** $Id: lua.h,v 1.178 2003/07/07 13:30:57 roberto Exp roberto $
 ** Lua - An Extensible Extension Language
 ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
 ** http://www.lua.org	mailto:info@lua.org
@@ -56,6 +56,12 @@ typedef int (*lua_Chunkwriter) (lua_State *L, const void* p,
                                 size_t sz, void* ud);
 
 
+/*
+** prototype for memory-allocation functions
+*/
+typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
+
+
 /*
 ** basic types
 */
@@ -101,7 +107,7 @@ typedef LUA_NUMBER lua_Number;
 /*
 ** state manipulation
 */
-LUA_API lua_State *lua_open (void);
+LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud);
 LUA_API void       lua_close (lua_State *L);
 LUA_API lua_State *lua_newthread (lua_State *L);
 
@@ -261,6 +267,7 @@ LUA_API void  lua_concat (lua_State *L, int n);
 ** compatibility macros and functions
 */
 
+#define lua_open()	luaL_newstate()
 
 #define lua_getregistry(L)	lua_pushvalue(L, LUA_REGISTRYINDEX)
 #define lua_setglobal(L,s)	\
-- 
cgit v1.2.3-55-g6feb