Diff

util-src/table.c @ 7969:1c6a07606309

util-src: Specify size of various tables to be allocated
author Kim Alvefur <zash@zash.se>
date Thu, 09 Mar 2017 01:20:59 +0100
parent 7936:582bfb39337f
child 12402:8deb401a21f6
line wrap: on
line diff
--- a/util-src/table.c	Thu Mar 09 00:59:32 2017 +0100
+++ b/util-src/table.c	Thu Mar 09 01:20:59 2017 +0100
@@ -24,7 +24,7 @@
 #if (LUA_VERSION_NUM > 501)
 	luaL_checkversion(L);
 #endif
-	lua_newtable(L);
+	lua_createtable(L, 0, 2);
 	lua_pushcfunction(L, Lcreate_table);
 	lua_setfield(L, -2, "create");
 	lua_pushcfunction(L, Lpack);