pidgin: 2bcc3cbe: Fix some macros to work with hidden stru...
rlaager at pidgin.im
rlaager at pidgin.im
Thu Oct 30 18:55:48 EDT 2008
-----------------------------------------------------------------
Revision: 2bcc3cbe370d7e6b6c2289752a4cbbab332532e0
Ancestor: d0c5d8d6f282465330cc495d1d7893c4adf1e608
Author: rlaager at pidgin.im
Date: 2008-10-30T19:58:25
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2bcc3cbe370d7e6b6c2289752a4cbbab332532e0
Modified files:
libpurple/blist.h
ChangeLog:
Fix some macros to work with hidden structs.
-------------- next part --------------
============================================================
--- libpurple/blist.h d1aec6e23a7db04071d746210ebbd15d9bc3ae49
+++ libpurple/blist.h 51498284711eabf924d7fbcb8062a2edd4e641b3
@@ -75,11 +75,11 @@ typedef enum
} PurpleBlistNodeFlags;
-#define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (((PurpleBlistNode*)(b))->flags & (f))
+#define PURPLE_BLIST_NODE_HAS_FLAG(b, f) (purple_blist_node_get_flags((PurpleBlistNode*)(b)) & (f))
#define PURPLE_BLIST_NODE_SHOULD_SAVE(b) (! PURPLE_BLIST_NODE_HAS_FLAG(b, PURPLE_BLIST_NODE_FLAG_NO_SAVE))
-#define PURPLE_BLIST_NODE_NAME(n) ((n)->type == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
- (n)->type == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
+#define PURPLE_BLIST_NODE_NAME(n) (purple_blist_node_get_type(n) == PURPLE_BLIST_CHAT_NODE ? purple_chat_get_name((PurpleChat*)n) : \
+ purple_blist_node_get_type(n) == PURPLE_BLIST_BUDDY_NODE ? purple_buddy_get_name((PurpleBuddy*)n) : NULL)
#include "account.h"
#include "buddyicon.h"
More information about the Commits
mailing list