summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-31 17:23:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-31 17:23:40 -0300
commitf0b3cd1d6f35ba34091450d5e3057269114a17b6 (patch)
treeceffcf31f1823709b7ab4e63801e5e483abf8490 /lua.h
parentfb5e6d5ac498649b8e1b6bf068d18078ef70d523 (diff)
downloadlua-f0b3cd1d6f35ba34091450d5e3057269114a17b6.tar.gz
lua-f0b3cd1d6f35ba34091450d5e3057269114a17b6.tar.bz2
lua-f0b3cd1d6f35ba34091450d5e3057269114a17b6.zip
new API functions `pop', `insert', and `move'
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lua.h b/lua.h
index 0ad37ad6..a5862ba5 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.62 2000/08/29 20:43:28 roberto Exp roberto $ 2** $Id: lua.h,v 1.63 2000/08/31 14:08:27 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -62,6 +62,8 @@ void lua_close (lua_State *L);
62int lua_gettop (lua_State *L); 62int lua_gettop (lua_State *L);
63void lua_settop (lua_State *L, int index); 63void lua_settop (lua_State *L, int index);
64void lua_pushobject (lua_State *L, int index); 64void lua_pushobject (lua_State *L, int index);
65void lua_move (lua_State *L, int index);
66void lua_insert (lua_State *L, int index);
65int lua_stackspace (lua_State *L); 67int lua_stackspace (lua_State *L);
66 68
67 69
@@ -152,6 +154,8 @@ int lua_next (lua_State *L);
152** =============================================================== 154** ===============================================================
153*/ 155*/
154 156
157#define lua_pop(L,n) lua_settop(L, -(n)-1)
158
155#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n)) 159#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
156#define lua_pushuserdata(L,u) lua_pushusertag(L, u, 0) 160#define lua_pushuserdata(L,u) lua_pushusertag(L, u, 0)
157#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) 161#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0)