X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/763d71e4420363190f63cf0e99e3a391ca7e90c6..c266945cab18b6f34286235f2950970575259339:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 8be7e483b5..dee8d45844 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -326,8 +326,15 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) #define wxPlatform "__WXMAC__" #endif +#ifdef __WXDEBUG__ + int wxdebug = 1; +#else + int wxdebug = 0; +#endif + PyDict_SetItemString(wxPython_dict, "wxPlatform", PyString_FromString(wxPlatform)); PyDict_SetItemString(wxPython_dict, "wxUSE_UNICODE", PyInt_FromLong(wxUSE_UNICODE)); + PyDict_SetItemString(wxPython_dict, "__WXDEBUG__", PyInt_FromLong(wxdebug)); Py_INCREF(Py_None); return Py_None; @@ -590,10 +597,10 @@ void wxPySaveThreadState(PyThreadState* tstate) { if (info.tstate != tstate) wxLogMessage("*** tstate mismatch!???"); #endif - // info.tstate = tstate; *** DO NOT updating existing ones??? + // info.tstate = tstate; *** DO NOT update existing ones??? // Normally it will never change, but apparently COM callbacks // (i.e. ActiveX controls) will (incorrectly IMHO) use a transient - // tstate wich 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... wxPyTMutex->Unlock(); return; @@ -826,6 +833,11 @@ wxPyCBInputStream* wxPyCBInputStream::create(PyObject *py, bool block) { return new wxPyCBInputStream(read, seek, tell, block); } + +wxPyCBInputStream* wxPyCBInputStream_create(PyObject *py, bool block) { + return wxPyCBInputStream::create(py, block); +} + PyObject* wxPyCBInputStream::getMethod(PyObject* py, char* name) { if (!PyObject_HasAttrString(py, name)) return NULL;