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

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


20080722182136-53eee-3dda92593ecf3bf23b7df43077d7b4e7718dc20f.gz
---
 src/media-stream.c |    4 +---
 src/media-stream.h |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/media-stream.c b/src/media-stream.c
index da1bfec..d28267f 100644
--- a/src/media-stream.c
+++ b/src/media-stream.c
@@ -92,7 +92,6 @@ enum
 };
 
 /* private structure */
-typedef struct _GabbleMediaStreamPrivate GabbleMediaStreamPrivate;
 
 struct _GabbleMediaStreamPrivate
 {
@@ -119,8 +118,7 @@ struct _GabbleMediaStreamPrivate
   gboolean local_hold:1;
 };
 
-#define GABBLE_MEDIA_STREAM_GET_PRIVATE(obj) \
-    ((GabbleMediaStreamPrivate *) obj->priv)
+#define GABBLE_MEDIA_STREAM_GET_PRIVATE(obj) ((obj)->priv)
 
 #ifdef ENABLE_DEBUG
 #if _GMS_DEBUG_LEVEL > 1
diff --git a/src/media-stream.h b/src/media-stream.h
index 360860f..719a5b6 100644
--- a/src/media-stream.h
+++ b/src/media-stream.h
@@ -41,6 +41,7 @@ typedef guint32 CombinedStreamDirection;
 
 typedef struct _GabbleMediaStream GabbleMediaStream;
 typedef struct _GabbleMediaStreamClass GabbleMediaStreamClass;
+typedef struct _GabbleMediaStreamPrivate GabbleMediaStreamPrivate;
 
 struct _GabbleMediaStreamClass {
     GObjectClass parent_class;
@@ -59,7 +60,7 @@ struct _GabbleMediaStream {
     gboolean got_local_codecs;
     gboolean playing;
 
-    gpointer priv;
+    GabbleMediaStreamPrivate *priv;
 };
 
 GType gabble_media_stream_get_type (void);
-- 
1.5.6.3




More information about the Telepathy-commits mailing list