[glibmm] gmmproc: _CLASS_GOBJECT: Remove __REAL_* additional arguments.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] gmmproc: _CLASS_GOBJECT: Remove __REAL_* additional arguments.
- Date: Thu, 23 Dec 2010 00:37:19 +0000 (UTC)
commit d1474424acaa3364442e1fb31254a6da338a3645
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Wed Dec 22 19:36:31 2010 -0500
gmmproc: _CLASS_GOBJECT: Remove __REAL_* additional arguments.
* tools/m4/class_gobject.m4:
* tools/m4/class_shared.m4: Remove the use of the
__REAL_[CNAME|CPARENT]__ variables needed to wrap some classes in
gtkmm that were typedef to their base type (such as GdkWindow and
GdkPixmap). These classes have been fixed in gtk+-3 thus eliminating
the need for the special arguments in _CLASS_GOBJECT.
ChangeLog | 11 +++++++++++
tools/m4/class_gobject.m4 | 12 +++---------
tools/m4/class_shared.m4 | 6 +++---
3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 25d4e14..166d0d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-22 José Alburquerque <jaalburqu svn gnome org>
+
+ gmmproc: _CLASS_GOBJECT: Remove __REAL_* additional arguments.
+
+ * tools/m4/class_gobject.m4:
+ * tools/m4/class_shared.m4: Remove the use of the
+ __REAL_[CNAME|CPARENT]__ variables needed to wrap some classes in
+ gtkmm that were typedef to their base type (such as GdkWindow and
+ GdkPixmap). These classes have been fixed in gtk+-3 thus eliminating
+ the need for the special arguments in _CLASS_GOBJECT.
+
2010-08-10 David Kozub <zub linux fjfi cvut cz>
RefPtr: Make it work with sorted containers (e.g. std::set<RefPtr<T> >).
diff --git a/tools/m4/class_gobject.m4 b/tools/m4/class_gobject.m4
index 12cbec6..6aed5d6 100644
--- a/tools/m4/class_gobject.m4
+++ b/tools/m4/class_gobject.m4
@@ -13,12 +13,6 @@ define(`__CPPPARENT__',`$4')
define(`__CPARENT__',`$5')
define(`__PCAST__',`($5*)')
-dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type,
-dnl rather than the real instance type. That is really ugly, yes. We get around
-dnl the problem by supporting optional __REAL_* arguments to this macro.
-define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6'))
-define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7'))
-
_POP()
_SECTION(SECTION_CLASS2)
@@ -119,7 +113,7 @@ namespace Glib
*
* @relates __NAMESPACE__::__CPPNAME__
*/
- Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy = false);
+ Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy = false);
}
')dnl
@@ -143,7 +137,7 @@ ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
namespace Glib
{
-Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy)
+Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy)
{
return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>( dynamic_cast<__NAMESPACE__::__CPPNAME__*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
@@ -223,7 +217,7 @@ public:
typedef __CPPNAME__ CppObjectType;
typedef __CPPNAME__`'_Class CppClassType;
typedef __CNAME__ BaseObjectType;
- typedef __REAL_CNAME__`'Class BaseClassType;
+ typedef __CNAME__`'Class BaseClassType;
m4_ifdef(`__BOOL_PROTECTED_GCLASS__',
`protected:',`dnl else
diff --git a/tools/m4/class_shared.m4 b/tools/m4/class_shared.m4
index c9286da..2ccc041 100644
--- a/tools/m4/class_shared.m4
+++ b/tools/m4/class_shared.m4
@@ -64,13 +64,13 @@ class __CPPNAME__`'_Class : public Glib::Class
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
- typedef __REAL_CNAME__ BaseObjectType;
+ typedef __CNAME__ BaseObjectType;
ifdef(`__BOOL_DO_NOT_DERIVE_GTYPE__',`dnl
typedef __CPPPARENT__`'_Class CppClassParent;
',`dnl
- typedef __REAL_CNAME__`'Class BaseClassType;
+ typedef __CNAME__`'Class BaseClassType;
typedef __CPPPARENT__`'_Class CppClassParent;
- typedef __REAL_CPARENT__`'Class BaseClassParent;
+ typedef __CPARENT__`'Class BaseClassParent;
')dnl
friend class __CPPNAME__;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]