equal
deleted
inserted
replaced
243 }; |
243 }; |
244 |
244 |
245 int luaopen_lm_message_node (lua_State *L) |
245 int luaopen_lm_message_node (lua_State *L) |
246 { |
246 { |
247 luaL_newmetatable (L, "loudmouth.message_node"); |
247 luaL_newmetatable (L, "loudmouth.message_node"); |
248 lua_pushstring (L, "__index"); |
248 lua_pushvalue (L, -1); |
249 lua_pushvalue (L, -2); |
249 lua_setfield (L, -2, "__index"); |
250 lua_settable (L, -3); |
|
251 luaL_register (L, NULL, reg_m_lm_node); |
250 luaL_register (L, NULL, reg_m_lm_node); |
252 lua_pop (L, 1); |
251 lua_pop (L, 1); |
253 lua_newtable (L); // XXX we can specify here exact amount of fields |
252 lua_newtable (L); // XXX we can specify here exact amount of fields |
254 luaL_register (L, NULL, reg_f_lm_node); |
253 luaL_register (L, NULL, reg_f_lm_node); |
255 return 1; |
254 return 1; |