X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db301e681f78550c6a852fc0ce00537c5f930fa2..6e9324fc527ecbde9ebf19f107c20f4c1eba8f38:/wxPython/src/helpers.cpp?ds=inline diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index aa4ebd2986..c10641926d 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -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 @@ -1385,7 +1385,7 @@ PyObject* wxPyCBInputStream::getMethod(PyObject* py, char* name) { } -size_t wxPyCBInputStream::GetSize() const { +wxFileOffset wxPyCBInputStream::GetLength() const { wxPyCBInputStream* self = (wxPyCBInputStream*)this; // cast off const if (m_seek && m_tell) { wxFileOffset temp = self->OnSysTell(); @@ -1394,7 +1394,7 @@ size_t wxPyCBInputStream::GetSize() const { return ret; } else - return 0; + return wxInvalidOffset; }