static C++ object initialization only seems to be necessary when the library

initialization routine needs to use static C++ objects


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-05-03 17:46:01 +00:00
parent e95edd8d51
commit edf0993cae

View File

@@ -189,7 +189,7 @@ void wxClassInfo::InitializeClasses()
size_t nClass = 0; size_t nClass = 0;
#endif #endif
wxClassInfo::sm_classTable = new wxHashTable(wxKEY_STRING); sm_classTable = new wxHashTable(wxKEY_STRING);
// Index all class infos by their class name // Index all class infos by their class name
@@ -325,7 +325,7 @@ wxObject::CloneRefData(const wxObjectRefData * WXUNUSED(data)) const
// misc // misc
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__DARWIN__) && defined(DYLIB_INIT) #if defined(__DARWIN__) && defined(WXMAKINGDLL)
extern "C" { extern "C" {
void __initialize_Cplusplus(void); void __initialize_Cplusplus(void);
@@ -343,6 +343,8 @@ void wxWindowsDylibInit()
// library initialization routine to cause the static C++ objects in // library initialization routine to cause the static C++ objects in
// the library to be initialized (reference number 2441683). // the library to be initialized (reference number 2441683).
// This only seems to be necessary if the library initialization routine
// needs to use the static C++ objects
__initialize_Cplusplus(); __initialize_Cplusplus();
} }