void WXDLLEXPORT wxEntryCleanup();
wxPyApp* wxPythonApp = NULL; // Global instance of application object
+bool wxPyDoCleanup = FALSE;
#ifdef WXP_WITH_THREAD
if (wxTopLevelWindows.Number() > 0)
return;
+ wxPyDoCleanup = TRUE;
int argc = 0;
char** argv = NULL;
void __wxCleanup() {
- wxEntryCleanup();
+ if (wxPyDoCleanup)
+ wxEntryCleanup();
#ifdef WXP_WITH_THREAD
delete wxPyTMutex;
wxPyTMutex = NULL;
PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff);
if (! classobj) {
- char temp[128];
- sprintf(temp,
- "*** Unknown class name %s, tell Robin about it please ***",
- buff);
- obj = PyString_FromString(temp);
- return obj;
+ wxString msg(wxT("wxPython class not found for "));
+ msg += className;
+ PyErr_SetString(PyExc_NameError, msg.mbc_str());
+ return NULL;
}
return wxPyConstructObject(ptr, className, classobj, setThisOwn);