From 71f3a6f0f7a347d2d2a92d33c189c6cba12c4577 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 26 Jun 2010 01:01:49 +0100 Subject: [PATCH] Don't include from public headers if GST_DISABLE_DEPRECATED is defined Since everything GstXML related has been deprecated, we can now skip the libxml includes from the public headers when GST_DISABLE_DEPRECATED is defined. See #463435. --- gst/gstbin.c | 1 + gst/gstcaps.c | 1 + gst/gstconfig.h.in | 2 ++ gst/gstelement.c | 1 + gst/gstghostpad.c | 3 +++ gst/gstobject.c | 1 + gst/gstpad.c | 3 +++ gst/gstxml.c | 1 + plugins/indexers/gstfileindex.c | 4 ++++ 9 files changed, 17 insertions(+) diff --git a/gst/gstbin.c b/gst/gstbin.c index 7987645..2019b9f 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -175,6 +175,7 @@ #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) #undef GstXmlNodePtr #define GstXmlNodePtr xmlNodePtr +#include GstXmlNodePtr gst_object_save_thyself (GstObject * object, GstXmlNodePtr parent); void gst_object_restore_thyself (GstObject * object, GstXmlNodePtr parent); diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 243c751..26a7dbd 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -75,6 +75,7 @@ #ifdef GST_DISABLE_DEPRECATED #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) +#include xmlNodePtr gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent); GstCaps *gst_caps_load_thyself (xmlNodePtr parent); #endif diff --git a/gst/gstconfig.h.in b/gst/gstconfig.h.in index a849ecb..e23ea03 100644 --- a/gst/gstconfig.h.in +++ b/gst/gstconfig.h.in @@ -194,7 +194,9 @@ /* FIXME: move include to where we need it */ /*#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )*/ #ifndef GST_DISABLE_XML +#ifndef GST_DISABLE_DEPRECATED # include +#endif #else /* FIXME: 0.11 (replace by GST_DISABLE_XML) */ # define GST_DISABLE_LOADSAVE_REGISTRY diff --git a/gst/gstelement.c b/gst/gstelement.c index d9030c0..3d7daff 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -111,6 +111,7 @@ enum #ifdef GST_DISABLE_DEPRECATED #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) +#include xmlNodePtr gst_object_save_thyself (const GstObject * object, xmlNodePtr parent); GstObject *gst_object_load_thyself (xmlNodePtr parent); diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index 7852166..3da71c5 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -78,6 +78,9 @@ static void gst_proxy_pad_dispose (GObject * object); static void gst_proxy_pad_finalize (GObject * object); #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) +#ifdef GST_DISABLE_DEPRECATED +#include +#endif static xmlNodePtr gst_proxy_pad_save_thyself (GstObject * object, xmlNodePtr parent); #endif diff --git a/gst/gstobject.c b/gst/gstobject.c index dc6eda9..11dd6b5 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -154,6 +154,7 @@ static gboolean gst_object_set_name_default (GstObject * object); #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) #undef GstXmlNodePtr #define GstXmlNodePtr xmlNodePtr +#include GstXmlNodePtr gst_object_save_thyself (GstObject * object, GstXmlNodePtr parent); void gst_object_restore_thyself (GstObject * object, GstXmlNodePtr parent); diff --git a/gst/gstpad.c b/gst/gstpad.c index 6808bfc..0e0f7de 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -119,6 +119,9 @@ static gboolean gst_pad_activate_default (GstPad * pad); static gboolean gst_pad_acceptcaps_default (GstPad * pad, GstCaps * caps); #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) +#ifdef GST_DISABLE_DEPRECATED +#include +#endif static xmlNodePtr gst_pad_save_thyself (GstObject * object, xmlNodePtr parent); void gst_pad_load_and_link (xmlNodePtr self, GstObject * parent); #endif diff --git a/gst/gstxml.c b/gst/gstxml.c index b972e39..9fa1e31 100644 --- a/gst/gstxml.c +++ b/gst/gstxml.c @@ -47,6 +47,7 @@ #ifdef GST_DISABLE_DEPRECATED #if !defined(GST_DISABLE_LOADSAVE) && !defined(GST_REMOVE_DEPRECATED) +#include xmlNodePtr gst_object_save_thyself (const GstObject * object, xmlNodePtr parent); GstObject *gst_object_load_thyself (xmlNodePtr parent); diff --git a/plugins/indexers/gstfileindex.c b/plugins/indexers/gstfileindex.c index 4bcd359..4744abc 100644 --- a/plugins/indexers/gstfileindex.c +++ b/plugins/indexers/gstfileindex.c @@ -27,6 +27,10 @@ #include #include +#ifdef GST_DISABLE_DEPRECATED +#include +#endif + #include "gstindexers.h" #define GST_TYPE_FILE_INDEX \ -- 2.7.4