changeset 19 | d775d7289fe4 |
parent 16 | 09b375e9ce32 |
child 23 | 13f03e604c8a |
--- a/lm_proxy.c Sun Apr 05 16:55:48 2009 +0300 +++ b/lm_proxy.c Mon Apr 27 13:15:23 2009 +0300 @@ -165,9 +165,8 @@ int luaopen_lm_proxy (lua_State *L) { luaL_newmetatable (L, "loudmouth.proxy"); - lua_pushstring (L, "__index"); - lua_pushvalue (L, -2); - lua_settable (L, -3); + lua_pushvalue (L, -1); + lua_setfield (L, -2, "__index"); luaL_register (L, NULL, reg_m_lm_proxy); lua_pop (L, 1); lua_newtable (L); // XXX we can specify here exact amount of fields