pidgin: b630f330: use some additional preproc logic to avo...

grim at pidgin.im grim at pidgin.im
Wed Oct 29 23:35:22 EDT 2008


-----------------------------------------------------------------
Revision: b630f3305c53ab0eb32b948911940959cc873699
Ancestor: 06e4830f3567955e026f3d594afcc65a07d57b26
Author: grim at pidgin.im
Date: 2008-10-30T03:34:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b630f3305c53ab0eb32b948911940959cc873699

Modified files:
        libpurple/blist.c libpurple/blist.h

ChangeLog: 

use some additional preproc logic to avoid copying the structs directly into the implementation files


-------------- next part --------------
============================================================
--- libpurple/blist.c	75c3e7939b998bb26041fbd1341779ad2165828a
+++ libpurple/blist.c	b90d368f010ac7bb099c92e49dc8b35c4a1cf570
@@ -20,6 +20,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+#define PURPLE_BLIST_STRUCTS
+
 #include "internal.h"
 #include "blist.h"
 #include "conversation.h"
@@ -41,60 +43,6 @@ static gboolean       blist_loaded = FAL
 static guint          save_timer = 0;
 static gboolean       blist_loaded = FALSE;
 
-
-/******************************************************************************
- * Structs
- *****************************************************************************/
-#ifdef PURPLE_HIDE_STRUCTS
-struct _PurpleBlistNode {
-    PurpleBlistNodeType type;
-    PurpleBlistNode *prev;
-    PurpleBlistNode *next;
-    PurpleBlistNode *parent;
-    PurpleBlistNode *child;
-    GHashTable *settings;
-    void *ui_data;
-    PurpleBlistNodeFlags flags;
-};
-
-struct _PurpleBuddy {
-    PurpleBlistNode node;
-    char *name;
-    char *alias;
-    char *server_alias;
-    void *proto_data;
-    PurpleBuddyIcon *icon;
-    PurpleAccount *account;
-    PurplePresence *presence;
-};
-
-struct _PurpleContact {
-    PurpleBlistNode node;
-    char *alias;
-    int totalsize;
-    int currentsize;
-    int online;
-    PurpleBuddy *priority;
-    gboolean priority_valid;
-};
-
-struct _PurpleGroup {
-    PurpleBlistNode node;
-    char *name;
-    int totalsize;
-    int currentsize;
-    int online;
-};
-
-struct _PurpleChat {
-    PurpleBlistNode node;
-    char *alias;
-    GHashTable *components;
-    PurpleAccount *account;
-};
-
-#endif /* PURPLE_HIDE_STRUCTS */
-
 /*********************************************************************
  * Private utility functions                                         *
  *********************************************************************/
============================================================
--- libpurple/blist.h	2758bf86cdd320c8d3ac0088d58c3a0af10ffba1
+++ libpurple/blist.h	d1aec6e23a7db04071d746210ebbd15d9bc3ae49
@@ -89,7 +89,7 @@ typedef enum
 /* Data Structures                                                        */
 /**************************************************************************/
 
-#ifndef PURPLE_HIDE_STRUCTS
+#if !(defined PURPLE_HIDE_STRUCTS) || (defined PURPLE_BLIST_STRUCTS)
 
 /**
  * A Buddy list node.  This can represent a group, a buddy, or anything else.
@@ -156,7 +156,7 @@ struct _PurpleChat {
 	PurpleAccount *account; /**< The account this chat is attached to */
 };
 
-#endif /* PURPLE_HIDE_STRUCTS */
+#endif /* PURPLE_HIDE_STRUCTS && PURPLE_BLIST_STRUCTS */
 
 
 /**


More information about the Commits mailing list