lm_proxy.c
changeset 54 6bef2082e5f9
parent 38 34a2b880615c
child 63 c17f3295f52c
equal deleted inserted replaced
53:2dcfa81100e4 54:6bef2082e5f9
   182 int luaopen_lm_proxy (lua_State *L)
   182 int luaopen_lm_proxy (lua_State *L)
   183 {
   183 {
   184 	luaL_newmetatable (L, "loudmouth.proxy");
   184 	luaL_newmetatable (L, "loudmouth.proxy");
   185 	lua_pushvalue (L, -1);
   185 	lua_pushvalue (L, -1);
   186 	lua_setfield (L, -2, "__index");
   186 	lua_setfield (L, -2, "__index");
   187 	luaL_register (L, NULL, reg_m_lm_proxy);
   187 	luaL_setfuncs (L, reg_m_lm_proxy, 0);
   188 	lua_pop (L, 1);
   188 	lua_pop (L, 1);
   189 	lua_newtable (L); // XXX we can specify here exact amount of fields
   189 	lua_newtable (L); // XXX we can specify here exact amount of fields
   190 	luaL_register (L, NULL, reg_f_lm_proxy);
   190 	luaL_setfuncs (L, reg_f_lm_proxy, 0);
   191 	return 1;
   191 	return 1;
   192 }
   192 }
   193 
   193