[Telepathy-commits] [telepathy-gabble/master] GabbleIMChannel: simplify priv access

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:37 PDT 2008


20080722182115-53eee-2354f61ac070d8599593414218790a339ab4707f.gz
---
 src/im-channel.c |    4 +---
 src/im-channel.h |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/im-channel.c b/src/im-channel.c
index 584dff4..9347f87 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -80,7 +80,6 @@ enum
 };
 
 /* private structure */
-typedef struct _GabbleIMChannelPrivate GabbleIMChannelPrivate;
 
 struct _GabbleIMChannelPrivate
 {
@@ -95,8 +94,7 @@ struct _GabbleIMChannelPrivate
   gboolean dispose_has_run;
 };
 
-#define GABBLE_IM_CHANNEL_GET_PRIVATE(obj) \
-    ((GabbleIMChannelPrivate *) obj->priv)
+#define GABBLE_IM_CHANNEL_GET_PRIVATE(obj) ((obj)->priv)
 
 static void
 gabble_im_channel_init (GabbleIMChannel *self)
diff --git a/src/im-channel.h b/src/im-channel.h
index 6ec96bd..47c94d4 100644
--- a/src/im-channel.h
+++ b/src/im-channel.h
@@ -31,6 +31,7 @@ G_BEGIN_DECLS
 
 typedef struct _GabbleIMChannel GabbleIMChannel;
 typedef struct _GabbleIMChannelClass GabbleIMChannelClass;
+typedef struct _GabbleIMChannelPrivate GabbleIMChannelPrivate;
 
 struct _GabbleIMChannelClass {
     GObjectClass parent_class;
@@ -44,7 +45,7 @@ struct _GabbleIMChannel {
 
     GabbleTextMixin text;
 
-    gpointer priv;
+    GabbleIMChannelPrivate *priv;
 };
 
 GType gabble_im_channel_get_type (void);
-- 
1.5.6.3




More information about the Telepathy-commits mailing list