Mercurial > prosody-hg
comparison util-src/table.c @ 6621:352fa2cae1c9
Merge 0.10->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 03 Apr 2015 19:34:47 +0100 |
| parents | 8e4572a642cb |
| children | d278a770eddc |
comparison
equal
deleted
inserted
replaced
| 6614:c78f8f8f4434 | 6621:352fa2cae1c9 |
|---|---|
| 4 static int Lcreate_table(lua_State* L) { | 4 static int Lcreate_table(lua_State* L) { |
| 5 lua_createtable(L, luaL_checkinteger(L, 1), luaL_checkinteger(L, 2)); | 5 lua_createtable(L, luaL_checkinteger(L, 1), luaL_checkinteger(L, 2)); |
| 6 return 1; | 6 return 1; |
| 7 } | 7 } |
| 8 | 8 |
| 9 int luaopen_util_table(lua_State *L) { | 9 int luaopen_util_table(lua_State* L) { |
| 10 lua_newtable(L); | 10 lua_newtable(L); |
| 11 lua_pushcfunction(L, Lcreate_table); | 11 lua_pushcfunction(L, Lcreate_table); |
| 12 lua_setfield(L, -2, "create"); | 12 lua_setfield(L, -2, "create"); |
| 13 return 1; | 13 return 1; |
| 14 } | 14 } |
