diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-09 01:20:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-09 01:20:59 +0100 |
commit | 384687ffa49ac61dddb91be1ec5de1572ba2c036 (patch) | |
tree | bbd6a9c2b24a4bbf263cc2645276de0bcdfd23ae /util-src/ringbuffer.c | |
parent | e1a8887ccd0b60d06eb823242572b4526014fe80 (diff) | |
download | prosody-384687ffa49ac61dddb91be1ec5de1572ba2c036.tar.gz prosody-384687ffa49ac61dddb91be1ec5de1572ba2c036.zip |
util-src: Specify size of various tables to be allocated
Diffstat (limited to 'util-src/ringbuffer.c')
-rw-r--r-- | util-src/ringbuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-src/ringbuffer.c b/util-src/ringbuffer.c index 2a13903c..8d9e49e6 100644 --- a/util-src/ringbuffer.c +++ b/util-src/ringbuffer.c @@ -187,7 +187,7 @@ int luaopen_util_ringbuffer(lua_State *L) { lua_pushcfunction(L, rb_length); lua_setfield(L, -2, "__len"); - lua_newtable(L); /* __index */ + lua_createtable(L, 0, 7); /* __index */ { lua_pushcfunction(L, rb_find); lua_setfield(L, -2, "find"); @@ -207,7 +207,7 @@ int luaopen_util_ringbuffer(lua_State *L) { lua_setfield(L, -2, "__index"); } - lua_newtable(L); + lua_createtable(L, 0, 1); lua_pushcfunction(L, rb_new); lua_setfield(L, -2, "new"); return 1; |