[glibmm] Add _CUSTOM_CTOR_CAST macro for _CLASS_OPAQUE_COPYABLE.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Add _CUSTOM_CTOR_CAST macro for _CLASS_OPAQUE_COPYABLE.
- Date: Sat, 28 Jul 2012 16:20:10 +0000 (UTC)
commit a79200da81698a3ea51b911737f2525393a30079
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Jul 22 19:47:21 2012 +0200
Add _CUSTOM_CTOR_CAST macro for _CLASS_OPAQUE_COPYABLE.
* tools/m4/class_opaque_copyable.m4: New macro.
ChangeLog | 6 ++++++
tools/m4/class_opaque_copyable.m4 | 9 +++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4f8f4b6..420883b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-28 Krzesimir Nowak <qdlacz gmail com>
+
+ Add _CUSTOM_CTOR_CAST macro for _CLASS_OPAQUE_COPYABLE.
+
+ * tools/m4/class_opaque_copyable.m4: New macro.
+
2012-07-26 Kjell Ahlstedt <kjell ahlstedt bredband net>
Glib::Threads:[Rec]Mutex: Add wrap() functions.
diff --git a/tools/m4/class_opaque_copyable.m4 b/tools/m4/class_opaque_copyable.m4
index 9223e88..81be7b5 100644
--- a/tools/m4/class_opaque_copyable.m4
+++ b/tools/m4/class_opaque_copyable.m4
@@ -21,6 +21,13 @@ 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)
') dnl End of _CLASS_OPAQUE_COPYABLE.
@@ -91,6 +98,7 @@ __CPPNAME__::__CPPNAME__`'(const __CPPNAME__& src)
gobject_ ((src.gobject_) ? __OPAQUE_FUNC_COPY`'(src.gobject_) : 0)
{}
+ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem, bool make_a_copy /* = false */)
{
if(!make_a_copy)
@@ -108,6 +116,7 @@ __CPPNAME__::__CPPNAME__`'(__CNAME__* castitem, bool make_a_copy /* = false */)
gobject_ = 0;
}
}
+')
ifelse(__OPAQUE_FUNC_COPY,NONE,`dnl
',`dnl else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]