* Don't reset LC_NUMERIC if on Python 2.4
* Always save the tstate git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -424,7 +424,7 @@ void wxPyApp::_BootstrapApp()
|
|||||||
// On wxGTK the locale will be changed to match the system settings, but
|
// 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
|
// Python needs to have LC_NUMERIC set to "C" in order for the floating
|
||||||
// point conversions and such to work right.
|
// point conversions and such to work right.
|
||||||
#ifdef __WXGTK__
|
#if defined(__WXGTK__) && PYTHON_API_VERSION <= 1012
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -635,7 +635,7 @@ PyObject* __wxPySetDictionary(PyObject* /* self */, PyObject* args)
|
|||||||
PyDict_SetItemString(wxPython_dict, "USE_UNICODE", PyInt_FromLong(wxUSE_UNICODE));
|
PyDict_SetItemString(wxPython_dict, "USE_UNICODE", PyInt_FromLong(wxUSE_UNICODE));
|
||||||
PyDict_SetItemString(wxPython_dict, "__WXDEBUG__", PyInt_FromLong(wxdebug));
|
PyDict_SetItemString(wxPython_dict, "__WXDEBUG__", PyInt_FromLong(wxdebug));
|
||||||
|
|
||||||
|
// Make a tuple of strings that gives more info about the platform.
|
||||||
PyObject* PlatInfo = PyList_New(0);
|
PyObject* PlatInfo = PyList_New(0);
|
||||||
PyObject* obj;
|
PyObject* obj;
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ PyObject* __wxPySetDictionary(PyObject* /* self */, PyObject* args)
|
|||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
_AddInfoString("unicode");
|
_AddInfoString("unicode");
|
||||||
#else
|
#else
|
||||||
_AddInfoString("ascii");
|
_AddInfoString("ansi");
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
@@ -1088,11 +1088,12 @@ void wxPySaveThreadState(PyThreadState* tstate) {
|
|||||||
if (info.tstate != tstate)
|
if (info.tstate != tstate)
|
||||||
wxLogMessage("*** tstate mismatch!???");
|
wxLogMessage("*** tstate mismatch!???");
|
||||||
#endif
|
#endif
|
||||||
// info.tstate = tstate; *** DO NOT update existing ones???
|
info.tstate = tstate; // allow for transient tstates
|
||||||
// Normally it will never change, but apparently COM callbacks
|
// Normally it will never change, but apparently COM callbacks
|
||||||
// (i.e. ActiveX controls) will (incorrectly IMHO) use a transient
|
// (i.e. ActiveX controls) will (incorrectly IMHO) use a transient
|
||||||
// tstate which will then be garbage the next time we try to use
|
// tstate which will then be garbage the next time we try to use
|
||||||
// it...
|
// it...
|
||||||
|
|
||||||
wxPyTMutex->Unlock();
|
wxPyTMutex->Unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user