Remove more functions unsupported in old glib versions
This commit is contained in:
parent
6ba649fdba
commit
7ef1648180
1 changed files with 12 additions and 2 deletions
|
@ -90,6 +90,16 @@ static void used_image_free (gpointer data)
|
|||
debug ("used_image: unref %d", id);
|
||||
}
|
||||
|
||||
static void queue_free_full (GQueue *queue, GDestroyNotify free_func)
|
||||
{
|
||||
void *entry;
|
||||
|
||||
while ((entry = g_queue_pop_head(queue))) {
|
||||
free_func (entry);
|
||||
}
|
||||
g_queue_free (queue);
|
||||
}
|
||||
|
||||
void used_images_add (connection_data *data, gint imgid)
|
||||
{
|
||||
data->used_images = g_list_append (data->used_images, GINT_TO_POINTER(imgid));
|
||||
|
@ -111,8 +121,8 @@ connection_data *connection_data_init (struct tgl_state *TLS, PurpleConnection *
|
|||
void *connection_data_free (connection_data *conn)
|
||||
{
|
||||
purple_timeout_remove(conn->timer);
|
||||
g_queue_free_full (conn->pending_reads, pending_reads_free_cb);
|
||||
g_queue_free_full (conn->new_messages, message_text_free);
|
||||
queue_free_full (conn->pending_reads, pending_reads_free_cb);
|
||||
queue_free_full (conn->new_messages, message_text_free);
|
||||
g_hash_table_destroy (conn->joining_chats);
|
||||
g_list_free_full (conn->used_images, used_image_free);
|
||||
tgl_free_all (conn->TLS);
|
||||
|
|
Loading…
Add table
Reference in a new issue