Merge 0.10->trunk
[prosody.git] / util-src / table.c
1 #include <lua.h>
2 #include <lauxlib.h>
3
4 static int Lcreate_table(lua_State* L) {
5         lua_createtable(L, luaL_checkinteger(L, 1), luaL_checkinteger(L, 2));
6         return 1;
7 }
8
9 int luaopen_util_table(lua_State* L) {
10         lua_newtable(L);
11         lua_pushcfunction(L, Lcreate_table);
12         lua_setfield(L, -2, "create");
13         return 1;
14 }