From 2a19cd8c49e94da192568ac15591f6dff60c43b3 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 17 Oct 2006 11:57:32 +0000 Subject: [PATCH] gst/gstobject.h: Don't define xmlNodePtr to gpointer if the core was built with Original commit message from CVS: Patch by: Peter Kjellerstedt * gst/gstobject.h: Don't define xmlNodePtr to gpointer if the core was built with --disable-loadsave and --disable-registry, this will break applications that want to use libxml2 but are buildling against a core that doesn't use libxml2. Use an intermediary type GstXmlNodePtr instead so we don't have to mess with the libxml2 namespace (#361675). --- ChangeLog | 12 ++++++++++++ gst/gstobject.h | 26 ++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index b719857b3f..6163fe01ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-10-17 Tim-Philipp Müller + + Patch by: Peter Kjellerstedt + + * gst/gstobject.h: + Don't define xmlNodePtr to gpointer if the core was built with + --disable-loadsave and --disable-registry, this will break + applications that want to use libxml2 but are buildling against a + core that doesn't use libxml2. Use an intermediary type GstXmlNodePtr + instead so we don't have to mess with the libxml2 namespace + (#361675). + 2006-10-17 Tim-Philipp Müller * gst/gstbuffer.h: diff --git a/gst/gstobject.h b/gst/gstobject.h index 837fd19597..c5c616e2e1 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -42,7 +42,9 @@ G_BEGIN_DECLS /* make sure we don't change the object size but still make it compile * without libxml */ #ifdef GST_DISABLE_LOADSAVE_REGISTRY -#define xmlNodePtr gpointer +#define GstXmlNodePtr gpointer +#else +#define GstXmlNodePtr xmlNodePtr #endif /** @@ -253,15 +255,15 @@ struct _GstObjectClass { GStaticRecMutex *lock; /* signals */ - void (*parent_set) (GstObject *object, GstObject *parent); - void (*parent_unset) (GstObject *object, GstObject *parent); - void (*object_saved) (GstObject *object, xmlNodePtr parent); - void (*deep_notify) (GstObject *object, GstObject *orig, GParamSpec *pspec); + void (*parent_set) (GstObject * object, GstObject * parent); + void (*parent_unset) (GstObject * object, GstObject * parent); + void (*object_saved) (GstObject * object, GstXmlNodePtr parent); + void (*deep_notify) (GstObject * object, GstObject * orig, GParamSpec * pspec); /*< public >*/ /* virtual methods for subclasses */ - xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent); - void (*restore_thyself) (GstObject *object, xmlNodePtr self); + GstXmlNodePtr (*save_thyself) (GstObject * object, GstXmlNodePtr parent); + void (*restore_thyself) (GstObject * object, GstXmlNodePtr self); /*< private >*/ gpointer _gst_reserved[GST_PADDING]; @@ -301,8 +303,8 @@ gboolean gst_object_check_uniqueness (GList *list, const gchar *name); /* load/save */ #ifndef GST_DISABLE_LOADSAVE_REGISTRY -xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent); -void gst_object_restore_thyself (GstObject *object, xmlNodePtr self); +GstXmlNodePtr gst_object_save_thyself (GstObject *object, GstXmlNodePtr parent); +void gst_object_restore_thyself (GstObject *object, GstXmlNodePtr self); #else #if defined _GNUC_ && _GNUC_ >= 3 #pragma GCC poison gst_object_save_thyself @@ -317,9 +319,9 @@ guint gst_class_signal_connect (GstObjectClass *klass, gpointer func_data); #ifndef GST_DISABLE_LOADSAVE_REGISTRY -void gst_class_signal_emit_by_name (GstObject *object, - const gchar *name, - xmlNodePtr self); +void gst_class_signal_emit_by_name (GstObject * object, + const gchar * name, + GstXmlNodePtr self); #else #if defined _GNUC_ && _GNUC_ >= 3 #pragma GCC poison gst_class_signal_emit_by_name