Use luaL_setfuncs and luaL_Reg[]