equal
deleted
inserted
replaced
86 luaL_argcheck (L, lua_islightuserdata (L, 2), 2, "glib main context lightuserdata expected"); |
86 luaL_argcheck (L, lua_islightuserdata (L, 2), 2, "glib main context lightuserdata expected"); |
87 connection = lm_connection_new_with_context (server, (GMainContext *) lua_touserdata (L, 2)); |
87 connection = lm_connection_new_with_context (server, (GMainContext *) lua_touserdata (L, 2)); |
88 } |
88 } |
89 bless_lm_connection (L, connection); |
89 bless_lm_connection (L, connection); |
90 lm_connection_unref (connection); |
90 lm_connection_unref (connection); |
91 D ("Connection %X created", (int) connection); |
91 D ("Connection %p created", connection); |
92 return 1; |
92 return 1; |
93 } |
93 } |
94 |
94 |
95 /// lm.connection.bless |
95 /// lm.connection.bless |
96 /// Blesses given pointer to lm connection object. |
96 /// Blesses given pointer to lm connection object. |
556 } |
556 } |
557 |
557 |
558 static int gc_lm_connection (lua_State *L) |
558 static int gc_lm_connection (lua_State *L) |
559 { |
559 { |
560 llm_connection_t *object = luaL_checklm_connection (L, 1); |
560 llm_connection_t *object = luaL_checklm_connection (L, 1); |
561 D ("Connection %X gc called", (int) object); |
561 D ("Connection %p gc called", object); |
562 lm_connection_unref (object->connection); |
562 lm_connection_unref (object->connection); |
563 return 0; |
563 return 0; |
564 } |
564 } |
565 |
565 |
566 static const luaL_Reg reg_f_lm_connection[] = { |
566 static const luaL_Reg reg_f_lm_connection[] = { |