Reset LC_NUMERIC to "C" for Python < 2.4. This fixes Python's float parser.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-11-12 18:12:49 +00:00
parent 6a91f7142d
commit ab897a69db
2 changed files with 42 additions and 14 deletions

View File

@@ -49,7 +49,7 @@
//----------------------------------------------------------------------
#if PYTHON_API_VERSION <= 1007 && wxUSE_UNICODE
#if PYTHON_API_VERSION < 1009 && wxUSE_UNICODE
#error Python must support Unicode to use wxWindows Unicode
#endif
@@ -421,10 +421,10 @@ void wxPyApp::_BootstrapApp()
goto error;
}
// On wxGTK the locale will be changed to match the system settings, but
// Python needs to have LC_NUMERIC set to "C" in order for the floating
// point conversions and such to work right.
#if defined(__WXGTK__) && PYTHON_API_VERSION <= 1012
// On wxGTK the locale will be changed to match the system settings,
// but Python before 2.4 needs to have LC_NUMERIC set to "C" in order
// for the floating point conversions and such to work right.
#if defined(__WXGTK__) && PY_VERSION_HEX < 0x02040000
setlocale(LC_NUMERIC, "C");
#endif