[glibmm] gmmproc: Add macro _CUSTOM_CTOR_CAST in _CLASS_BOXEDTYPE.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] gmmproc: Add macro _CUSTOM_CTOR_CAST in _CLASS_BOXEDTYPE.
- Date: Tue, 10 Apr 2012 12:12:14 +0000 (UTC)
commit 495387b090e3094d58a524b73a9ddabdc5a0aa3e
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Apr 5 16:32:52 2012 +0200
gmmproc: Add macro _CUSTOM_CTOR_CAST in _CLASS_BOXEDTYPE.
* tools/m4/class_boxedtype.m4: Add macro _CUSTOM_CTOR_CAST.
Bug #511136, comment 20.
ChangeLog | 7 +++++++
tools/m4/class_boxedtype.m4 | 10 ++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8cc1e87..ab01598 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-04-05 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+ gmmproc: Add macro _CUSTOM_CTOR_CAST in _CLASS_BOXEDTYPE.
+
+ * tools/m4/class_boxedtype.m4: Add macro _CUSTOM_CTOR_CAST.
+ Bug #511136, comment 20.
+
2012-04-10 Chun-wei Fan <fanc999 src gnome org>
Update Visual Studio projects
diff --git a/tools/m4/class_boxedtype.m4 b/tools/m4/class_boxedtype.m4
index f3186d4..fce5f65 100644
--- a/tools/m4/class_boxedtype.m4
+++ b/tools/m4/class_boxedtype.m4
@@ -21,6 +21,12 @@ define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1')
_POP()
')
+define(`_CUSTOM_CTOR_CAST',`dnl
+_PUSH()
+dnl Define this macro to be tested for later.
+define(`__BOOL_CUSTOM_CTOR_CAST__',`$1')
+_POP()
+')
_POP()
_SECTION(SECTION_CLASS2)
@@ -129,6 +135,7 @@ __CPPNAME__::__CPPNAME__`'(const __CPPNAME__& other)
gobject_ ((other.gobject_) ? __BOXEDTYPE_FUNC_COPY`'(other.gobject_) : 0)
{}
+ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
__CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy)
:
// For BoxedType wrappers, make_a_copy is true by default. The static
@@ -136,6 +143,7 @@ __CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy)
// ensures identical behaviour if the default argument is used.
gobject_ ((make_a_copy && gobject) ? __BOXEDTYPE_FUNC_COPY`'(gobject) : gobject)
{}
+')dnl
__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& other)
{
@@ -191,7 +199,9 @@ ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
__CPPNAME__`'();
')dnl
+ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
explicit __CPPNAME__`'(__CNAME__* gobject, bool make_a_copy = true);
+')dnl
__CPPNAME__`'(const __CPPNAME__& other);
__CPPNAME__& operator=(const __CPPNAME__& other);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]