chanegd wxTlsValue to be pointer-like instead of value-like which doesn't work for UDTs; use __thread keyword with mingw32 >= 4.3 too; use library-based thread-specific variables support in wxString cache now that it is fixed to work there; finally added a unit test for TLS stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,7 +59,6 @@
|
||||
const size_t wxString::npos = (size_t) -1;
|
||||
|
||||
#if wxUSE_STRING_POS_CACHE
|
||||
wxTLS_TYPE(wxString::Cache) wxString::ms_cache;
|
||||
|
||||
// gdb seems to be unable to display thread-local variables correctly, at least
|
||||
// not my 6.4.98 version under amd64, so provide this debugging helper to do it
|
||||
@@ -73,11 +72,11 @@ struct wxStrCacheDumper
|
||||
for ( unsigned n = 0; n < wxString::Cache::SIZE; n++ )
|
||||
{
|
||||
const wxString::Cache::Element&
|
||||
c = wxString::ms_cache.cached[n];
|
||||
c = wxString::GetCacheBegin()[n];
|
||||
|
||||
printf("\t%u%s\t%p: pos=(%lu, %lu), len=%ld\n",
|
||||
n,
|
||||
n == wxString::ms_cache.lastUsed ? " [*]" : "",
|
||||
n == wxString::LastUsedCacheElement() ? " [*]" : "",
|
||||
c.str,
|
||||
(unsigned long)c.pos,
|
||||
(unsigned long)c.impl,
|
||||
|
||||
Reference in New Issue
Block a user