aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/table.c
blob: 118ee334d5271d516683d1948f3a5ab887817349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <lua.h>
#include <lauxlib.h>

static int Lcreate_table(lua_State* L) {
	lua_createtable(L, luaL_checkinteger(L, 1), luaL_checkinteger(L, 2));
	return 1;
}

int luaopen_util_table(lua_State *L) {
	lua_newtable(L);
	lua_pushcfunction(L, Lcreate_table);
	lua_setfield(L, -2, "create");
	return 1;
}