solving osx problems (default inlines-hidden) by explicitely exporting the involved methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -607,7 +607,7 @@ private:
|
|||||||
// enough) -- luckily we don't need it then neither as static __thread
|
// enough) -- luckily we don't need it then neither as static __thread
|
||||||
// variables are initialized by 0 anyhow then and so we can use the variable
|
// variables are initialized by 0 anyhow then and so we can use the variable
|
||||||
// directly
|
// directly
|
||||||
static Cache& GetCache()
|
WXEXPORT static Cache& GetCache()
|
||||||
{
|
{
|
||||||
static wxTLS_TYPE(Cache) s_cache;
|
static wxTLS_TYPE(Cache) s_cache;
|
||||||
|
|
||||||
@@ -671,11 +671,15 @@ private:
|
|||||||
// profiling seems to show a small but consistent gain if we use this
|
// profiling seems to show a small but consistent gain if we use this
|
||||||
// simple loop instead of starting from the last used element (there are
|
// simple loop instead of starting from the last used element (there are
|
||||||
// a lot of misses in this function...)
|
// a lot of misses in this function...)
|
||||||
// during destruction tls calls may return NULL, thus return NULL
|
Cache::Element * const cacheBegin = GetCacheBegin();
|
||||||
// immediately
|
#if !wxHAS_COMPILER_TLS
|
||||||
if ( GetCacheBegin() == NULL )
|
// during destruction tls calls may return NULL, in this case return NULL
|
||||||
|
// immediately without accessing anything else
|
||||||
|
if ( cacheBegin == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
for ( Cache::Element *c = GetCacheBegin(); c != GetCacheEnd(); c++ )
|
#endif
|
||||||
|
Cache::Element * const cacheEnd = GetCacheEnd();
|
||||||
|
for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ )
|
||||||
{
|
{
|
||||||
if ( c->str == this )
|
if ( c->str == this )
|
||||||
return c;
|
return c;
|
||||||
|
@@ -207,11 +207,7 @@ private:
|
|||||||
#if !defined(__WXMSW__)
|
#if !defined(__WXMSW__)
|
||||||
#define wxCRITSECT_IS_MUTEX 1
|
#define wxCRITSECT_IS_MUTEX 1
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#define wxCRITSECT_INLINE WXEXPORT inline
|
||||||
#define wxCRITSECT_INLINE
|
|
||||||
#else
|
|
||||||
#define wxCRITSECT_INLINE inline
|
|
||||||
#endif
|
|
||||||
#else // MSW
|
#else // MSW
|
||||||
#define wxCRITSECT_IS_MUTEX 0
|
#define wxCRITSECT_IS_MUTEX 0
|
||||||
|
|
||||||
@@ -273,7 +269,7 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxCriticalSection)
|
DECLARE_NO_COPY_CLASS(wxCriticalSection)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxCRITSECT_IS_MUTEX && !defined(__WXMAC__)
|
#if wxCRITSECT_IS_MUTEX
|
||||||
// implement wxCriticalSection using mutexes
|
// implement wxCriticalSection using mutexes
|
||||||
inline wxCriticalSection::wxCriticalSection( wxCriticalSectionType critSecType )
|
inline wxCriticalSection::wxCriticalSection( wxCriticalSectionType critSecType )
|
||||||
: m_mutex( critSecType == wxCRITSEC_DEFAULT ? wxMUTEX_RECURSIVE : wxMUTEX_DEFAULT ) { }
|
: m_mutex( critSecType == wxCRITSEC_DEFAULT ? wxMUTEX_RECURSIVE : wxMUTEX_DEFAULT ) { }
|
||||||
|
@@ -76,6 +76,15 @@ struct wxStrCacheInitializer
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
wxString::Cache& wxString::GetCache()
|
||||||
|
{
|
||||||
|
static wxTLS_TYPE(Cache) s_cache;
|
||||||
|
|
||||||
|
return wxTLS_VALUE(s_cache);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static wxStrCacheInitializer gs_stringCacheInit;
|
static wxStrCacheInitializer gs_stringCacheInit;
|
||||||
|
|
||||||
#endif // wxHAS_COMPILER_TLS/!wxHAS_COMPILER_TLS
|
#endif // wxHAS_COMPILER_TLS/!wxHAS_COMPILER_TLS
|
||||||
|
@@ -67,17 +67,6 @@
|
|||||||
#define THR_ID(thr) ((long)(thr)->GetId())
|
#define THR_ID(thr) ((long)(thr)->GetId())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
|
||||||
|
|
||||||
// implement wxCriticalSection using mutexes
|
|
||||||
wxCriticalSection::wxCriticalSection( wxCriticalSectionType critSecType )
|
|
||||||
: m_mutex( critSecType == wxCRITSEC_DEFAULT ? wxMUTEX_RECURSIVE : wxMUTEX_DEFAULT ) { }
|
|
||||||
wxCriticalSection::~wxCriticalSection() { }
|
|
||||||
|
|
||||||
void wxCriticalSection::Enter() { (void)m_mutex.Lock(); }
|
|
||||||
void wxCriticalSection::Leave() { (void)m_mutex.Unlock(); }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user