lm_ssl.c
changeset 19 d775d7289fe4
parent 16 09b375e9ce32
child 23 13f03e604c8a
equal deleted inserted replaced
18:6effa1929af7 19:d775d7289fe4
   184 };
   184 };
   185 
   185 
   186 int luaopen_lm_ssl (lua_State *L)
   186 int luaopen_lm_ssl (lua_State *L)
   187 {
   187 {
   188 	luaL_newmetatable (L, "loudmouth.ssl");
   188 	luaL_newmetatable (L, "loudmouth.ssl");
   189 	lua_pushstring (L, "__index");
   189 	lua_pushvalue (L, -1);
   190 	lua_pushvalue (L, -2);
   190 	lua_setfield (L, -2, "__index");
   191 	lua_settable (L, -3);
       
   192 	luaL_register (L, NULL, reg_m_lm_ssl);
   191 	luaL_register (L, NULL, reg_m_lm_ssl);
   193 	lua_pop (L, 1);
   192 	lua_pop (L, 1);
   194 	lua_newtable (L); // XXX we can specify here exact amount of fields
   193 	lua_newtable (L); // XXX we can specify here exact amount of fields
   195 	luaL_register (L, NULL, reg_f_lm_ssl);
   194 	luaL_register (L, NULL, reg_f_lm_ssl);
   196 	return 1;
   195 	return 1;