lm_connection.c
changeset 54 6bef2082e5f9
parent 45 1fcec4b012a7
child 63 c17f3295f52c
equal deleted inserted replaced
53:2dcfa81100e4 54:6bef2082e5f9
   594 int luaopen_lm_connection (lua_State *L)
   594 int luaopen_lm_connection (lua_State *L)
   595 {
   595 {
   596 	luaL_newmetatable (L, "loudmouth.connection");
   596 	luaL_newmetatable (L, "loudmouth.connection");
   597 	lua_pushvalue (L, -1);
   597 	lua_pushvalue (L, -1);
   598 	lua_setfield (L, -2, "__index");
   598 	lua_setfield (L, -2, "__index");
   599 	luaL_register (L, NULL, reg_m_lm_connection);
   599 	luaL_setfuncs (L, reg_m_lm_connection, 0);
   600 	lua_pop (L, 1);
   600 	lua_pop (L, 1);
   601 	lua_newtable (L); // XXX we can specify here exact amount of fields
   601 	lua_newtable (L); // XXX we can specify here exact amount of fields
   602 	luaL_register (L, NULL, reg_f_lm_connection);
   602 	luaL_setfuncs (L, reg_f_lm_connection, 0);
   603 	return 1;
   603 	return 1;
   604 }
   604 }
   605 
   605