equal
deleted
inserted
replaced
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"); |
168 lua_pushstring (L, "__index"); |
168 lua_pushvalue (L, -1); |
169 lua_pushvalue (L, -2); |
169 lua_setfield (L, -2, "__index"); |
170 lua_settable (L, -3); |
|
171 luaL_register (L, NULL, reg_m_lm_proxy); |
170 luaL_register (L, NULL, reg_m_lm_proxy); |
172 lua_pop (L, 1); |
171 lua_pop (L, 1); |
173 lua_newtable (L); // XXX we can specify here exact amount of fields |
172 lua_newtable (L); // XXX we can specify here exact amount of fields |
174 luaL_register (L, NULL, reg_f_lm_proxy); |
173 luaL_register (L, NULL, reg_f_lm_proxy); |
175 return 1; |
174 return 1; |