[Telepathy-commits] [telepathy-gabble/master] GabbleConnection: simplify access to the priv pointer
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:36 PDT 2008
20080722180516-53eee-74e6b2f58ab322232d344b698f0e50c6f03828f6.gz
---
src/connection.c | 4 +---
src/connection.h | 3 ++-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/connection.c b/src/connection.c
index 34dc952..fbb59df 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -117,7 +117,6 @@ enum
};
/* private structure */
-typedef struct _GabbleConnectionPrivate GabbleConnectionPrivate;
struct _GabbleConnectionPrivate
{
@@ -165,8 +164,7 @@ struct _GabbleConnectionPrivate
gboolean dispose_has_run;
};
-#define GABBLE_CONNECTION_GET_PRIVATE(obj) \
- ((GabbleConnectionPrivate *) obj->priv)
+#define GABBLE_CONNECTION_GET_PRIVATE(obj) ((obj)->priv)
static void connection_capabilities_update_cb (GabblePresenceCache *,
TpHandle, GabblePresenceCapabilities, GabblePresenceCapabilities,
diff --git a/src/connection.h b/src/connection.h
index 2a8bccf..c22ba31 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -62,6 +62,7 @@ typedef enum
GABBLE_CONNECTION_FEATURES_PEP = 1 << 4,
} GabbleConnectionFeatures;
+typedef struct _GabbleConnectionPrivate GabbleConnectionPrivate;
typedef struct _GabbleConnectionClass GabbleConnectionClass;
typedef LmHandlerResult (*GabbleConnectionMsgReplyFunc) (GabbleConnection *conn,
@@ -138,7 +139,7 @@ struct _GabbleConnection {
/* outstanding avatar requests */
GHashTable *avatar_requests;
- gpointer priv;
+ GabbleConnectionPrivate *priv;
};
typedef enum {
--
1.5.6.3
More information about the Telepathy-commits
mailing list