diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-11-13 15:32:30 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-11-15 16:06:07 +0000 |
commit | 10511acd0839635ce6595d9e5b8aa9136b6bde38 (patch) | |
tree | a6fbced69da997685603ab8d5c45e4443fef439e /bridges/source/cpp_uno/msvc_win32_intel | |
parent | d8845ef02f76801f270f936411ce6b36f8caaca8 (diff) |
Revert "sb140: #i117295# use rtl::Static"
This reverts commit d3794d2d8ab2ee3f8118d61538bb753335b37f23.
Conflicts:
bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
Diffstat (limited to 'bridges/source/cpp_uno/msvc_win32_intel')
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_intel/except.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx index ed2e89bcacf2..94cbbff8ca50 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx @@ -36,7 +36,6 @@ #include <signal.h> #include "rtl/alloc.h" -#include <rtl/instance.hxx> #include "rtl/strbuf.hxx" #include "rtl/ustrbuf.hxx" @@ -184,7 +183,6 @@ RTTInfos::~RTTInfos() throw () } } -struct RTTISingleton: public rtl::Static< RTTInfos, RTTISingleton > {}; //################################################################################################## //#### Exception raising ########################################################################### @@ -455,7 +453,21 @@ void * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTypeDescr ) thro //################################################################################################## type_info * msci_getRTTI( OUString const & rUNOname ) { - return RTTISingleton::get().getRTTI( rUNOname ); + static RTTInfos * s_pRTTIs = 0; + if (! s_pRTTIs) + { + MutexGuard aGuard( Mutex::getGlobalMutex() ); + if (! s_pRTTIs) + { +#ifdef LEAK_STATIC_DATA + s_pRTTIs = new RTTInfos(); +#else + static RTTInfos s_aRTTIs; + s_pRTTIs = &s_aRTTIs; +#endif + } + } + return s_pRTTIs->getRTTI( rUNOname ); } //################################################################################################## |