lm_proxy.c
changeset 12 63f06a23c235
parent 11 a8c6460d612b
child 16 09b375e9ce32
equal deleted inserted replaced
11:a8c6460d612b 12:63f06a23c235
   146 }
   146 }
   147 
   147 
   148 static const luaL_Reg reg_f_lm_proxy[] = {
   148 static const luaL_Reg reg_f_lm_proxy[] = {
   149 	{ "new",   new_lm_proxy       },
   149 	{ "new",   new_lm_proxy       },
   150 	{ "bless", bless_lua_lm_proxy },
   150 	{ "bless", bless_lua_lm_proxy },
   151 	{ NULL,    NULL                },
   151 	{ NULL,    NULL               },
   152 };
   152 };
   153 
   153 
   154 static const luaL_Reg reg_m_lm_proxy[] = {
   154 static const luaL_Reg reg_m_lm_proxy[] = {
   155 	{ "port",     port_lm_proxy     },
   155 	{ "port",     port_lm_proxy     },
   156 	{ "server",   server_lm_proxy   },
   156 	{ "server",   server_lm_proxy   },
   157 	{ "type",     kind_lm_proxy     },
   157 	{ "type",     kind_lm_proxy     },
   158 	{ "username", username_lm_proxy },
   158 	{ "username", username_lm_proxy },
   159 	{ "password", password_lm_proxy },
   159 	{ "password", password_lm_proxy },
   160 	{ "pointer",  pointer_lm_proxy  },
   160 	{ "pointer",  pointer_lm_proxy  },
   161 	{ "__gc",     gc_lm_proxy       },
   161 	{ "__gc",     gc_lm_proxy       },
   162 	{ NULL,       NULL               },
   162 	{ NULL,       NULL              },
   163 };
   163 };
   164 
   164 
   165 int luaopen_lm_proxy (lua_State *L)
   165 int luaopen_lm_proxy (lua_State *L)
   166 {
   166 {
   167 	luaL_newmetatable (L, "loudmouth.proxy");
   167 	luaL_newmetatable (L, "loudmouth.proxy");