diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-10 10:29:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-10 10:29:28 -0300 |
commit | 10de467c794a536902755c236933623767bb452e (patch) | |
tree | bc0577eb71a887170abd07d8b7f52eade4518175 /lua.h | |
parent | 533737f26e3f8036d7978e09427ea5ff75aec9df (diff) | |
download | lua-10de467c794a536902755c236933623767bb452e.tar.gz lua-10de467c794a536902755c236933623767bb452e.tar.bz2 lua-10de467c794a536902755c236933623767bb452e.zip |
new function `lua_createtable'
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); | |||
185 | LUA_API void lua_getfield (lua_State *L, int idx, const char *k); | 185 | LUA_API void lua_getfield (lua_State *L, int idx, const char *k); |
186 | LUA_API void lua_rawget (lua_State *L, int idx); | 186 | LUA_API void lua_rawget (lua_State *L, int idx); |
187 | LUA_API void lua_rawgeti (lua_State *L, int idx, int n); | 187 | LUA_API void lua_rawgeti (lua_State *L, int idx, int n); |
188 | LUA_API void lua_newtable (lua_State *L); | 188 | LUA_API void lua_createtable (lua_State *L, int narr, int nrec); |
189 | LUA_API void *lua_newuserdata (lua_State *L, size_t sz); | 189 | LUA_API void *lua_newuserdata (lua_State *L, size_t sz); |
190 | LUA_API int lua_getmetatable (lua_State *L, int objindex); | 190 | LUA_API int lua_getmetatable (lua_State *L, int objindex); |
191 | LUA_API void lua_getfenv (lua_State *L, int idx); | 191 | LUA_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), \ |