[libcxx] r178545 - Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
Howard Hinnant
hhinnant at apple.com
Tue Apr 2 08:48:56 PDT 2013
Author: hhinnant
Date: Tue Apr 2 10:48:56 2013
New Revision: 178545
URL: http://llvm.org/viewvc/llvm-project?rev=178545&view=rev
Log:
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
Modified:
libcxx/trunk/src/support/win32/locale_win32.cpp
Modified: libcxx/trunk/src/support/win32/locale_win32.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/win32/locale_win32.cpp?rev=178545&r1=178544&r2=178545&view=diff
==============================================================================
--- libcxx/trunk/src/support/win32/locale_win32.cpp (original)
+++ libcxx/trunk/src/support/win32/locale_win32.cpp Tue Apr 2 10:48:56 2013
@@ -20,6 +20,8 @@ locale_t newlocale( int mask, const char
locale_t uselocale( locale_t newloc )
{
locale_t old_locale = _get_current_locale();
+ if ( newloc == NULL )
+ return old_locale;
// uselocale sets the thread's locale by definition, so unconditionally use thread-local locale
_configthreadlocale( _ENABLE_PER_THREAD_LOCALE );
// uselocale sets all categories
More information about the cfe-commits
mailing list