caps: Make GstCaps public struct more opaque by moving the private pointer into the...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 26 Jan 2012 13:45:30 +0000 (14:45 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 26 Jan 2012 13:45:30 +0000 (14:45 +0100)
gst/gstcaps.c
gst/gstcaps.h

index 9c1bd7f..f85c07e 100644 (file)
 
 #define DEBUG_REFCOUNT
 
+typedef struct _GstCapsImpl
+{
+  GstCaps caps;
+
+  GPtrArray *array;
+} GstCapsImpl;
 
-#define GST_CAPS_ARRAY(c) ((GPtrArray *)((c)->priv))
+#define GST_CAPS_ARRAY(c) (((GstCapsImpl *)(c))->array)
 
 #define GST_CAPS_LEN(c)   (GST_CAPS_ARRAY(c)->len)
 
@@ -191,7 +197,7 @@ gst_caps_init (GstCaps * caps, gsize size)
    * in practise
    * GST_CAPS_ARRAY (caps) = g_ptr_array_sized_new (32);
    */
-  caps->priv = g_ptr_array_new ();
+  GST_CAPS_ARRAY (caps) = g_ptr_array_new ();
 }
 
 /**
index 4b59c48..4603182 100644 (file)
@@ -344,9 +344,6 @@ gst_caps_take (GstCaps **old_caps, GstCaps *new_caps)
  */
 struct _GstCaps {
   GstMiniObject mini_object;
-
-  /*< private >*/
-  gpointer     priv;
 };
 
 /**