diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 5b4a4cabf9..027fd1601b 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,7 +2,15 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- -2.4.0.5 +2.4.0.6 (a.k.a. the I'm so stupid release) +------- +The new deprecation class for the old true/false symbols can now be +returned from OnInit. And I promise to be sure I am testing what I +think I am testing in the future... + + + +2.4.0.5 (a.k.a. the blame it on Kevin release) ------- A few little but annoying bug fixes. @@ -73,7 +81,7 @@ always call them. The functions are: wxApp_SetMacExitMenuItemId wxApp_SetMacHelpMenuTitleName -Refactored, enhanced and added capabilites for the DrawXXXList +Refactored, enhanced and added capabilities for the DrawXXXList functions, inspired by code from Chris Barker. The wxWindows .mo language catalog files are now installed in a @@ -396,8 +404,8 @@ Added XRCed to the wxPython Tools directory, contributed by Roman Rolinsky. Added a new "constructor" to most of the window classes that calls the -default C++ contructor, (the one with no parameters) and also added the -coresponding Create(...) method. This allows you to do a 2-step +default C++ constructor, (the one with no parameters) and also added the +corresponding Create(...) method. This allows you to do a 2-step creation of windows which is sometimes required for doing things such as setting extended style flags before the window is created, or for passing the object to the XRC resource system to be created from the @@ -933,7 +941,7 @@ methods look like this: toggle=FALSE) -There are also coresponding InsertTool and InsertSimpleTool methods +There are also corresponding InsertTool and InsertSimpleTool methods that additionally take an integer position as the first parameter. Added a wrapper for the new PCX and TIFF ImageHandlers. diff --git a/wxPython/setup.py b/wxPython/setup.py index 05b48775c1..e9774cb6a8 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -13,7 +13,7 @@ from distutils.command.install_data import install_data # flags and values that affect this script #---------------------------------------------------------------------- -VERSION = "2.4.0.5" +VERSION = "2.4.0.6" DESCRIPTION = "Cross platform GUI toolkit for Python" AUTHOR = "Robin Dunn" AUTHOR_EMAIL = "Robin Dunn " diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py index ed6e2e06e1..f56c9be1a3 100644 --- a/wxPython/src/__version__.py +++ b/wxPython/src/__version__.py @@ -1 +1 @@ -ver = '2.4.0.5' +ver = '2.4.0.6' diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index cc6fd4e546..0c8d4c2e63 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -445,26 +445,35 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) // Call the Python App's OnInit function arglist = PyTuple_New(0); result = PyEval_CallObject(onInitFunc, arglist); + Py_DECREF(arglist); if (!result) { // an exception was raised. return NULL; } - if (! PyInt_Check(result)) { + PyObject* pyint = PyNumber_Int(result); + if (! pyint) { PyErr_SetString(PyExc_TypeError, "OnInit should return a boolean value"); - return NULL; + goto error; } - bResult = PyInt_AS_LONG(result); + bResult = PyInt_AS_LONG(pyint); if (! bResult) { PyErr_SetString(PyExc_SystemExit, "OnInit returned FALSE, exiting..."); - return NULL; + goto error; } #ifdef __WXGTK__ wxTheApp->m_initialized = (wxTopLevelWindows.GetCount() > 0); #endif + Py_DECREF(result); + Py_DECREF(pyint); Py_INCREF(Py_None); return Py_None; + + error: + Py_XDECREF(result); + Py_XDECREF(pyint); + return NULL; }