summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schulze <mschulze@cvs.gnome.org>2004-04-26 21:08:57 +0000
committerMartin Schulze <mschulze@src.gnome.org>2004-04-26 21:08:57 +0000
commitdd36c7d1a5b9d29031a9d1ae84211f51fbd43ab0 (patch)
treea90a5b869259971ae55faffc4f2533d108c63e40
parente35f247f22045b64e7bbf0ee6dadeec73f2c2125 (diff)
downloadsigc++-dd36c7d1a5b9d29031a9d1ae84211f51fbd43ab0.tar.gz
Modified test for SigC::Object inheritance so that it also works if
2004-04-26 Martin Schulze <mschulze@cvs.gnome.org> * sigc++/macros/object_slot.h.m4: Modified test for SigC::Object inheritance so that it also works if SigC::Object is virtual base. (Fixes bug 141094 reported by Jonathan Brandmeyer)
-rw-r--r--ChangeLog6
-rw-r--r--sigc++/macros/object_slot.h.m44
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 471f011..04a78c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-04-26 Martin Schulze <mschulze@cvs.gnome.org>
+ * sigc++/macros/object_slot.h.m4: Modified test for SigC::Object
+ inheritance so that it also works if SigC::Object is virtual base.
+ (Fixes bug 141094 reported by Jonathan Brandmeyer)
+
+2004-04-26 Martin Schulze <mschulze@cvs.gnome.org>
+
* scripts/cxx.m4: Updated the configure check. It would probably
have succeeded on the Apple.
diff --git a/sigc++/macros/object_slot.h.m4 b/sigc++/macros/object_slot.h.m4
index 13a1e18..4e06889 100644
--- a/sigc++/macros/object_slot.h.m4
+++ b/sigc++/macros/object_slot.h.m4
@@ -32,8 +32,8 @@ define([SLOT_MEM_FUN],[dnl
template <LIST(class T_return, LOOP(class T_arg%1, $1), class T_obj1, class T_obj2)>
inline Slot$1<LIST(T_return, LOOP(T_arg%1, $1))>
slot($3 T_obj1& _A_obj, T_return (T_obj2::*_A_func)(LOOP(T_arg%1,$1)) $4)
-{ return ::sigc::bound_mem_functor$1<LIST(T_return, T_obj2, LOOP(T_arg%1, $1))>
- (static_cast<$3 T_obj1&>(static_cast<$3 Object&>(_A_obj)), _A_func); }
+{ $3 Object& test_whether_A_obj_derives_from_trackable = dynamic_cast<$3 Object&>(_A_obj);
+ return ::sigc::bound_mem_functor$1<LIST(T_return, T_obj2, LOOP(T_arg%1, $1))>(_A_obj, _A_func); }
])