X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3bc06221f04615811781ab91b46b2e44c5e9c4a4..f07962f933088c85ae0776cd2e4aec4579d31ffa:/wxPython/src/helpers.cpp?ds=sidebyside diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index a17498e304..3ae9023311 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -28,7 +28,9 @@ #include #include #include -#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) +#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ + GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \ + GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) #include #endif @@ -1428,7 +1430,7 @@ size_t wxPyCBInputStream::OnSysWrite(const void *buffer, size_t bufsize) { wxFileOffset wxPyCBInputStream::OnSysSeek(wxFileOffset off, wxSeekMode mode) { bool blocked = wxPyBeginBlockThreads(); -#if defined( __WINCE__) || defined(_LARGE_FILES) || defined(__HUGEFILES_SUPPORTED) +#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES // wxFileOffset is a 64-bit value... PyObject* arglist = Py_BuildValue("(Li)", off, mode); #else @@ -1449,7 +1451,7 @@ wxFileOffset wxPyCBInputStream::OnSysTell() const { Py_DECREF(arglist); wxFileOffset o = 0; if (result != NULL) { -#if defined( __WINCE__) || defined(_LARGE_FILES) || defined(__HUGEFILES_SUPPORTED) +#if defined( __WINCE__) || defined(_LARGE_FILES) || wxHAS_HUGE_FILES if (PyLong_Check(result)) o = PyLong_AsLongLong(result); else