aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-10 10:29:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-10 10:29:28 -0300
commit10de467c794a536902755c236933623767bb452e (patch)
treebc0577eb71a887170abd07d8b7f52eade4518175 /lua.h
parent533737f26e3f8036d7978e09427ea5ff75aec9df (diff)
downloadlua-10de467c794a536902755c236933623767bb452e.tar.gz
lua-10de467c794a536902755c236933623767bb452e.tar.bz2
lua-10de467c794a536902755c236933623767bb452e.zip
new function `lua_createtable'
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index 4e4d5c45..04f83578 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.180 2003/10/07 20:13:41 roberto Exp roberto $ 2** $Id: lua.h,v 1.181 2003/10/10 12:57:55 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
@@ -185,7 +185,7 @@ LUA_API void lua_gettable (lua_State *L, int idx);
185LUA_API void lua_getfield (lua_State *L, int idx, const char *k); 185LUA_API void lua_getfield (lua_State *L, int idx, const char *k);
186LUA_API void lua_rawget (lua_State *L, int idx); 186LUA_API void lua_rawget (lua_State *L, int idx);
187LUA_API void lua_rawgeti (lua_State *L, int idx, int n); 187LUA_API void lua_rawgeti (lua_State *L, int idx, int n);
188LUA_API void lua_newtable (lua_State *L); 188LUA_API void lua_createtable (lua_State *L, int narr, int nrec);
189LUA_API void *lua_newuserdata (lua_State *L, size_t sz); 189LUA_API void *lua_newuserdata (lua_State *L, size_t sz);
190LUA_API int lua_getmetatable (lua_State *L, int objindex); 190LUA_API int lua_getmetatable (lua_State *L, int objindex);
191LUA_API void lua_getfenv (lua_State *L, int idx); 191LUA_API void lua_getfenv (lua_State *L, int idx);
@@ -254,6 +254,8 @@ LUA_API void lua_concat (lua_State *L, int n);
254 254
255#define lua_pop(L,n) lua_settop(L, -(n)-1) 255#define lua_pop(L,n) lua_settop(L, -(n)-1)
256 256
257#define lua_newtable(L) lua_createtable(L, 0, 0)
258
257#define lua_register(L,n,f) \ 259#define lua_register(L,n,f) \
258 (lua_pushstring(L, n), \ 260 (lua_pushstring(L, n), \
259 lua_pushcfunction(L, f), \ 261 lua_pushcfunction(L, f), \