aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-02 17:31:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-02 17:31:17 -0300
commitb97fb932ece7872a8d1dd6c0a2c88f3ce33e9741 (patch)
treed9e60044a35ad3fdf761f28506be08205081ebd7 /lua.h
parentc7cf92e6f318823406e40ad6016e5ccb4e041c72 (diff)
downloadlua-b97fb932ece7872a8d1dd6c0a2c88f3ce33e9741.tar.gz
lua-b97fb932ece7872a8d1dd6c0a2c88f3ce33e9741.tar.bz2
lua-b97fb932ece7872a8d1dd6c0a2c88f3ce33e9741.zip
Lua kernel does not use malloc/free functions.
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index 8285c555..abea10af 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.177 2003/05/15 12:20:04 roberto Exp roberto $ 2** $Id: lua.h,v 1.178 2003/07/07 13:30:57 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** http://www.lua.org mailto:info@lua.org 5** http://www.lua.org mailto:info@lua.org
@@ -57,6 +57,12 @@ typedef int (*lua_Chunkwriter) (lua_State *L, const void* p,
57 57
58 58
59/* 59/*
60** prototype for memory-allocation functions
61*/
62typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
63
64
65/*
60** basic types 66** basic types
61*/ 67*/
62#define LUA_TNONE (-1) 68#define LUA_TNONE (-1)
@@ -101,7 +107,7 @@ typedef LUA_NUMBER lua_Number;
101/* 107/*
102** state manipulation 108** state manipulation
103*/ 109*/
104LUA_API lua_State *lua_open (void); 110LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud);
105LUA_API void lua_close (lua_State *L); 111LUA_API void lua_close (lua_State *L);
106LUA_API lua_State *lua_newthread (lua_State *L); 112LUA_API lua_State *lua_newthread (lua_State *L);
107 113
@@ -261,6 +267,7 @@ LUA_API void lua_concat (lua_State *L, int n);
261** compatibility macros and functions 267** compatibility macros and functions
262*/ 268*/
263 269
270#define lua_open() luaL_newstate()
264 271
265#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 272#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX)
266#define lua_setglobal(L,s) \ 273#define lua_setglobal(L,s) \