Make _() and friends safe to call from any thread.

The GetUntranslatedString() hack keeps a global copy of all strings, so
that it can return a const reference as wxGetTranslation() return value.
A global wxHashSet instance shared by all threads won't do, even guarded
with a critical section, because it may internally copy values on any
insert and thus invalidate pointers that may still be used on another
thread.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2013-09-18 16:03:20 +00:00
parent 92c0fc34c1
commit d2740de55e
4 changed files with 29 additions and 12 deletions

View File

@@ -568,6 +568,7 @@ All:
- Fix build with wxUSE_FFILE==0 (jroemmler).
- Add wxDEPRECATED_MSG() and use it in a few places.
- Return the old file descriptor/pointer from wx(F)File::Detach() (troelsk).
- _() and wxGetTranslation() are now thread-safe.
All (GUI):