equal
deleted
inserted
replaced
278 }; |
278 }; |
279 |
279 |
280 int luaopen_lm_message (lua_State *L) |
280 int luaopen_lm_message (lua_State *L) |
281 { |
281 { |
282 luaL_newmetatable (L, "loudmouth.message"); |
282 luaL_newmetatable (L, "loudmouth.message"); |
283 lua_pushstring (L, "__index"); |
283 lua_pushvalue (L, -1); |
284 lua_pushvalue (L, -2); |
284 lua_setfield (L, -2, "__index"); |
285 lua_settable (L, -3); |
|
286 luaL_register (L, NULL, reg_m_lm_message); |
285 luaL_register (L, NULL, reg_m_lm_message); |
287 lua_pop (L, 1); |
286 lua_pop (L, 1); |
288 lua_newtable (L); // XXX we can specify here exact amount of fields |
287 lua_newtable (L); // XXX we can specify here exact amount of fields |
289 luaL_register (L, NULL, reg_f_lm_message); |
288 luaL_register (L, NULL, reg_f_lm_message); |
290 return 1; |
289 return 1; |