gst/gstobject.h: Don't define xmlNodePtr to gpointer if the core was built with

Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj at axis com>
* 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).
This commit is contained in:
Peter Kjellerstedt 2006-10-17 11:57:32 +00:00 committed by Tim-Philipp Müller
parent c64c4fd000
commit 2a19cd8c49
2 changed files with 26 additions and 12 deletions

View file

@ -1,3 +1,15 @@
2006-10-17 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Peter Kjellerstedt <pkj at axis com>
* 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 <tim at centricular dot net>
* gst/gstbuffer.h:

View file

@ -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
/**
@ -255,13 +257,13 @@ struct _GstObjectClass {
/* signals */
void (*parent_set) (GstObject * object, GstObject * parent);
void (*parent_unset) (GstObject * object, GstObject * parent);
void (*object_saved) (GstObject *object, xmlNodePtr 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
@ -319,7 +321,7 @@ guint gst_class_signal_connect (GstObjectClass *klass,
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
void gst_class_signal_emit_by_name (GstObject * object,
const gchar * name,
xmlNodePtr self);
GstXmlNodePtr self);
#else
#if defined _GNUC_ && _GNUC_ >= 3
#pragma GCC poison gst_class_signal_emit_by_name