]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
fix for using wxDataObjectComposite with the clipboard
[wxWidgets.git] / src / common / object.cpp
index 83a8fec5ad349385e424ae3bd75aee4b918ed95e..20e531a1f26da1639a3700e11acc091feced95b1 100644 (file)
     #endif // wxUSE_SERIAL
 #endif // WX_PRECOMP
 
     #endif // wxUSE_SERIAL
 #endif // WX_PRECOMP
 
+#ifdef __VISAGECPP__
+        #include "wx/objstrm.h"
+        #include "wx/serbase.h"
+#endif
+
 #include <string.h>
 #include <assert.h>
 
 #include <string.h>
 #include <assert.h>
 
@@ -99,22 +104,6 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
         return FALSE;
 }
 
         return FALSE;
 }
 
-wxObject *wxObject::Clone() const
-{
-    wxObject *object = GetClassInfo()->CreateObject();
-    CopyObject(*object);
-    return object;
-}
-
-#ifdef __WXDEBUG__
-void wxObject::CopyObject(wxObject& object_dest) const
-#else // !Debug
-void wxObject::CopyObject(wxObject& WXUNUSED(object_dest)) const
-#endif // Debug/!Debug
-{
-    wxASSERT(object_dest.GetClassInfo()->IsKindOf(GetClassInfo()));
-}
-
 #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
 void wxObject::Dump(wxSTD ostream& str)
 {
 #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
 void wxObject::Dump(wxSTD ostream& str)
 {
@@ -423,3 +412,26 @@ wxObjectRefData::wxObjectRefData(void) : m_count(1)
 wxObjectRefData::~wxObjectRefData()
 {
 }
 wxObjectRefData::~wxObjectRefData()
 {
 }
+
+#if defined(__DARWIN__) && defined(DYLIB_INIT)
+
+extern "C" {
+    void __initialize_Cplusplus(void);
+    void wxWindowsDylibInit(void);
+};
+
+// Dynamic shared library (dylib) initialization routine
+//   required to initialize static C++ objects bacause of lazy dynamic linking
+//   http://developer.apple.com/techpubs/macosx/Essentials/
+//          SystemOverview/Frameworks/Dynamic_Shared_Libraries.html
+//
+void wxWindowsDylibInit()
+{
+    // The function __initialize_Cplusplus() must be called from the shared
+    // library initialization routine to cause the static C++ objects in
+    // the library to be initialized (reference number 2441683).
+
+    __initialize_Cplusplus();
+}
+
+#endif