changeset 16520:e7d820a42bf8

merge of '58f0224296247fea130a53f723d74fc0e6bab65a' and 'a999246dfcbd33c9494afa445d9562aee5e5457c'
author Richard Laager <rlaager@wiktel.com>
date Fri, 27 Apr 2007 14:27:54 +0000
parents ecfb07301611 (current diff) e4a1980c0090 (diff)
children ff7a7fe88049
files
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/imgstore.c	Fri Apr 27 14:27:48 2007 +0000
+++ b/libpurple/imgstore.c	Fri Apr 27 14:27:54 2007 +0000
@@ -71,13 +71,13 @@
 	PurpleStoredImage *img = purple_imgstore_add(data, size, filename);
 	img->id = ++nextid;
 
-	g_hash_table_insert(imgstore, &(img->id), img);
+	g_hash_table_insert(imgstore, GINT_TO_POINTER(img->id), img);
 
 	return img->id;
 }
 
 PurpleStoredImage *purple_imgstore_find_by_id(int id) {
-	PurpleStoredImage *img = g_hash_table_lookup(imgstore, &id);
+	PurpleStoredImage *img = g_hash_table_lookup(imgstore, GINT_TO_POINTER(id));
 
 	if (img != NULL)
 		purple_debug_misc("imgstore", "retrieved image id %d\n", img->id);
@@ -155,7 +155,7 @@
 		purple_signal_emit(purple_imgstore_get_handle(),
 		                   "image-deleting", img);
 		if (img->id)
-			g_hash_table_remove(imgstore, &img->id);
+			g_hash_table_remove(imgstore, GINT_TO_POINTER(img->id));
 
 		g_free(img->data);
 		g_free(img->filename);