← Back to team overview

ayatana-commits team mailing list archive

[Branch ~ted/libindicate/messages-v2] Rev 393: Who would be stupid enough to use all these casts and not the macros provided. 'bzr blame' Oh, i...

 

------------------------------------------------------------
revno: 393
committer: Ted Gould <ted@xxxxxxxxxxxxx>
branch nick: messages-v2
timestamp: Thu 2009-09-03 21:58:25 -0500
message:
  Who would be stupid enough to use all these casts and not the macros provided. 'bzr blame'  Oh, it was me.
modified:
  libindicate/listener.c


--
lp:~ted/libindicate/messages-v2
https://code.launchpad.net/~ted/libindicate/messages-v2

Your team ayatana-commits is subscribed to branch lp:~ted/libindicate/messages-v2.
To unsubscribe from this branch go to https://code.launchpad.net/~ted/libindicate/messages-v2/+edit-subscription.
=== modified file 'libindicate/listener.c'
--- libindicate/listener.c	2009-09-01 17:09:56 +0000
+++ libindicate/listener.c	2009-09-04 02:58:25 +0000
@@ -618,8 +618,8 @@
 		proxy_server_added (proxy, NULL, proxyt);
 	}
 
-	if (!g_hash_table_lookup(proxyt->indicators, (gpointer)id)) {
-		g_hash_table_insert(proxyt->indicators, (gpointer)id, (gpointer)TRUE);
+	if (!g_hash_table_lookup(proxyt->indicators, GUINT_TO_POINTER(id))) {
+		g_hash_table_insert(proxyt->indicators, GUINT_TO_POINTER(id), GUINT_TO_POINTER(TRUE));
 		g_signal_emit(proxyt->listener, signals[INDICATOR_ADDED], 0, &proxyt->server, GUINT_TO_POINTER(id), TRUE);
 	}
 
@@ -634,12 +634,12 @@
 		return;
 	}
 
-	if (!g_hash_table_lookup(proxyt->indicators, (gpointer)id)) {
+	if (!g_hash_table_lookup(proxyt->indicators, GUINT_TO_POINTER(id))) {
 		g_warning("No indicator %d on '%s'.", id, proxyt->name);
 		return;
 	}
 
-	g_hash_table_remove(proxyt->indicators, (gpointer)id);
+	g_hash_table_remove(proxyt->indicators, GUINT_TO_POINTER(id));
 	g_signal_emit(proxyt->listener, signals[INDICATOR_REMOVED], 0, &proxyt->server, GUINT_TO_POINTER(id), TRUE);
 
 	return;
@@ -653,7 +653,7 @@
 		return;
 	}
 
-	if (!g_hash_table_lookup(proxyt->indicators, (gpointer)id)) {
+	if (!g_hash_table_lookup(proxyt->indicators, GUINT_TO_POINTER(id))) {
 		g_warning("Can not modify indicator %d with property '%s' as there are no indicators with that id on %s.", id, property, proxyt->name);
 		return;
 	}