[gstreamermm] TagList: Distinguish wrap method by name rather than by parameter.
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gstreamermm] TagList: Distinguish wrap method by name rather than by parameter.
- Date: Tue, 27 Oct 2009 16:16:55 +0000 (UTC)
commit 4226d58b8c93991f7342262d57254642350a0dd9
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Tue Oct 27 12:16:24 2009 -0400
TagList: Distinguish wrap method by name rather than by parameter.
* gstreamer/src/message.ccg:
* gstreamer/src/tagsetter.hg:
* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc:
* tools/m4/class_boxedtype_extra.m4:
* tools/m4/convert_gst.m4: Use Glib::wrap_taglist() for the TagList
wrap() method instead of distinguishing it by parameters.
ChangeLog | 11 +++++++++++
gstreamer/src/message.ccg | 2 +-
gstreamer/src/tagsetter.hg | 2 +-
.../extra_defs_gen/generate_plugin_gmmproc_file.cc | 18 ++++++++++--------
tools/m4/class_boxedtype_extra.m4 | 8 +++-----
tools/m4/convert_gst.m4 | 2 +-
6 files changed, 27 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 76c96a7..0e002e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-10-26 José Alburquerque <jaalburqu svn gnome org>
+
+ TagList: Distinguish wrap method by name rather than by parameter.
+
+ * gstreamer/src/message.ccg:
+ * gstreamer/src/tagsetter.hg:
+ * tools/extra_defs_gen/generate_plugin_gmmproc_file.cc:
+ * tools/m4/class_boxedtype_extra.m4:
+ * tools/m4/convert_gst.m4: Use Glib::wrap_taglist() for the TagList
+ wrap() method instead of distinguishing it by parameters.
+
2009-10-23 José Alburquerque <jaalburqu svn gnome org>
MiniObject: Make the constructors and destructor protected.
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index c0f64b1..0631403 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -229,7 +229,7 @@ void MessageTag::parse(Glib::RefPtr<Gst::Pad>& pad, Gst::TagList& tag_list)
pad = Glib::wrap(gst_pad);
// Use the Gst::TagList specific Glib::wrap() function:
- tag_list = Glib::wrap(gst_tag_list, 0);
+ tag_list = Glib::wrap_taglist(gst_tag_list);
}
Gst::TagList MessageTag::parse() const
diff --git a/gstreamer/src/tagsetter.hg b/gstreamer/src/tagsetter.hg
index f3e96fe..c50e1b0 100644
--- a/gstreamer/src/tagsetter.hg
+++ b/gstreamer/src/tagsetter.hg
@@ -109,7 +109,7 @@ public:
TagMergeMode mode=TAG_MERGE_PREPEND);
// A copy is taken so that the original is not freed by the wrapper.
-#m4 _CONVERSION(`const GstTagList*',`const Gst::TagList',`Glib::wrap(const_cast<GstTagList*>($3), 0, true)')
+#m4 _CONVERSION(`const GstTagList*',`const Gst::TagList',`Glib::wrap_taglist(const_cast<GstTagList*>($3), true)')
_WRAP_METHOD(const Gst::TagList get_tag_list() const, gst_tag_setter_get_tag_list)
_WRAP_METHOD(void set_tag_merge_mode(TagMergeMode mode), gst_tag_setter_set_tag_merge_mode)
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index c33a44f..0264234 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -333,17 +333,19 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
if(returnGType == GST_TYPE_TAG_LIST)
{
- // Dealing with a GstTagList* return which has a special Glib::wrap()
- // because of the conflict with the Glib::wrap() for GstStructure*
- // (GstTagList is infact a GstStructure).
+ // Dealing with a GstTagList* return which has a special
+ // Glib::wrap() because of the conflict with the Glib::wrap() for
+ // GstStructure* (GstTagList is infact a GstStructure).
convertMacros += "#m4 _CONVERSION(``" + returnCType + "'', "
- "_LQ()_TRANSLATE(" + returnCType + ",`return')_RQ(), ``Glib::wrap($3, 0)'')\n";
+ "_LQ()_TRANSLATE(" + returnCType +
+ ",`return')_RQ(), ``Glib::wrap_taglist($3)'')\n";
}
else
{
// Dealing with a regular boxed type return.
convertMacros += "#m4 _CONVERSION(``" + returnCType + "'', "
- "_LQ()_TRANSLATE(" + returnCType + ",`return')_RQ(), ``Glib::wrap($3)'')\n";
+ "_LQ()_TRANSLATE(" + returnCType +
+ ",`return')_RQ(), ``Glib::wrap($3)'')\n";
}
}
else
@@ -413,11 +415,11 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
if(paramGType == GST_TYPE_TAG_LIST)
{
// Dealing with a GstTagList* which has a special Glib::wrap()
- // because of the conflict with the Glib::wrap() for GstStructure*
- // (GstTagList is in fact a GstStructure).
+ // because of the conflict with the Glib::wrap() for
+ // GstStructure* (GstTagList is in fact a GstStructure).
convertMacros += "#m4 _CONVERSION(``" + paramCType + "'', "
"_LQ()_TRANSLATE(" + paramCType + ",`param')_RQ(), "
- "``Glib::wrap($3, 0, true)'')\n";
+ "``Glib::wrap_taglist($3, true)'')\n";
}
else
{
diff --git a/tools/m4/class_boxedtype_extra.m4 b/tools/m4/class_boxedtype_extra.m4
index f52dc28..b1229ca 100644
--- a/tools/m4/class_boxedtype_extra.m4
+++ b/tools/m4/class_boxedtype_extra.m4
@@ -65,17 +65,15 @@ namespace Glib
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
-/** A Glib::wrap() method for this object. The dummy int parameter is added to disambiguate Gst::TagList::wrap() from Gst::Structure::wrap() (GstTagList is in fact a GstStructure so wrap method becomes ambiguous).
-dnl TODO: This seems like a bad idea to me. Why not just rename the function?
+/** A Glib::wrap() method for this object. The method has a non-standard name because otherwise it would collide with the wrap method for Gst::Structure because both Gst::TagList and Gst::Structure wrap the same underlying C type.
*
* @param object The C instance.
- * @param dummy An unused parameter to disambiguate Gst::TagList::wrap() from Gst::Structure::wrap(). The value of this parameter is irrelevant.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
-__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, int dummy, bool take_copy = false);
+__NAMESPACE__::__CPPNAME__ wrap_taglist(__CNAME__* object, bool take_copy = false);
')dnl endif __BOOL_NO_WRAP_FUNCTION__
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -93,7 +91,7 @@ ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
namespace Glib
{
-__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, int, bool take_copy)
+__NAMESPACE__::__CPPNAME__ wrap_taglist(__CNAME__* object, bool take_copy)
{
return __NAMESPACE__::__CPPNAME__`'(object, take_copy);
}
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index d22c03f..60ce02c 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -165,7 +165,7 @@ _CONVERSION(`Gst::Structure&',`GstStructure*',`$3.gobj()')
dnl TagList
_CONVERSION(`const Gst::TagList&',`const GstTagList*',`$3.gobj()')
-_CONVERSION(`GstTagList*',`Gst::TagList',`Glib::wrap($3, 0)')
+_CONVERSION(`GstTagList*',`Gst::TagList',`Glib::wrap_taglist($3)')
_CONVERSION(`Gst::TagList&',`GstTagList*',`$3.gobj()')
_CONVERSION(`Gst::TagList',`GstTagList*',`$3.gobj()')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]