From b4066a6c956a29f7bb977f5a8b9f2a77af02f539 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 26 Jan 2012 14:45:30 +0100 Subject: [PATCH] caps: Make GstCaps public struct more opaque by moving the private pointer into the implementation --- gst/gstcaps.c | 10 ++++++++-- gst/gstcaps.h | 3 --- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 9c1bd7f..f85c07e 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -75,8 +75,14 @@ #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 (); } /** diff --git a/gst/gstcaps.h b/gst/gstcaps.h index 4b59c48..4603182 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -344,9 +344,6 @@ gst_caps_take (GstCaps **old_caps, GstCaps *new_caps) */ struct _GstCaps { GstMiniObject mini_object; - - /*< private >*/ - gpointer priv; }; /** -- 2.7.4