diff --git a/bin/build-sip-msw b/bin/build-sip-msw index 7700bfe3..3aa1b6f9 100644 --- a/bin/build-sip-msw +++ b/bin/build-sip-msw @@ -19,6 +19,16 @@ fi MYBINDIR=$(dirname $(readlink -f $0)) +# This is specific to my machine. If you need to build your own sip then adjust accordingly +export INCLUDE="c:\TOOLS\VisStudio9\VC\ATLMFC\INCLUDE;c:\TOOLS\VisStudio9\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;" +export LIB="c:\TOOLS\VisStudio9\VC\ATLMFC\LIB;c:\TOOLS\VisStudio9\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;" +export SDK_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1" +export PATH="/c/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Bin:$PATH" + +echo "INCLUDE: $INCLUDE" +echo "LIB: $LIB" + + cd /c/projects/sip/sip SIPVER=$($PYTHON -c "import sys,configure; sys.stdout.write(configure.sip_version_str);") diff --git a/build.py b/build.py index d1facd4a..cd77d7d7 100755 --- a/build.py +++ b/build.py @@ -87,12 +87,12 @@ wxICON = 'packaging/docset/mondrian.png' # Some tools will be downloaded for the builds. These are the versions and # MD5s of the tool binaries currently in use. -sipCurrentVersion = '4.19.19' +sipCurrentVersion = '4.19.23' sipMD5 = { - 'darwin' : '3309e69f2341f11bac263d7faea19616', - 'win32' : 'fd8be5c5fa369a848e907acad6879846', - 'linux32' : 'd0271b47695e74483f0c0d54f24819d5', - 'linux64' : '355410a19846768cdeb53efe249aabdb', + 'darwin' : 'cbd84be2a54eee9a85d53b2b464c9e62', + 'win32' : 'e9082463286f5233544f801de6d00642', + 'linux32' : '0147794b52af30d356eed07517da1d48', + 'linux64' : '4f8c41f5157a48020b87683538842124', } wafCurrentVersion = '2.0.19' diff --git a/etg/grid.py b/etg/grid.py index cf76b326..65ffd7f4 100644 --- a/etg/grid.py +++ b/etg/grid.py @@ -405,9 +405,6 @@ def run(): module.find('wxGridCellEditorPtr').piIgnored = True module.find('wxGridCellAttrPtr').piIgnored = True - module.addHeaderCode('#define sipName_ptr "ptr"') - module.addHeaderCode('#define sipName_tocopy "tocopy"') - #----------------------------------------------------------------- # The instanceCode attribute is code that is used to make a default # instance of the class. We can't create them using the same class in diff --git a/sip/siplib/sip.h b/sip/siplib/sip.h index bcb53ab2..5dc022ee 100644 --- a/sip/siplib/sip.h +++ b/sip/siplib/sip.h @@ -1,7 +1,7 @@ /* * The SIP module interface. * - * Copyright (c) 2018 Riverbank Computing Limited + * Copyright (c) 2020 Riverbank Computing Limited * * This file is part of SIP. * @@ -54,8 +54,8 @@ extern "C" { /* * Define the SIP version number. */ -#define SIP_VERSION 0x041313 -#define SIP_VERSION_STR "4.19.19" +#define SIP_VERSION 0x041317 +#define SIP_VERSION_STR "4.19.23" /* diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c index e2c90784..a31ddbec 100644 --- a/sip/siplib/siplib.c +++ b/sip/siplib/siplib.c @@ -1,7 +1,7 @@ /* * SIP library code. * - * Copyright (c) 2019 Riverbank Computing Limited + * Copyright (c) 2020 Riverbank Computing Limited * * This file is part of SIP. * @@ -9338,6 +9338,7 @@ static PyObject *sip_api_get_reference(PyObject *self, int key) return NULL; obj = PyDict_GetItem(dict, key_obj); + Py_DECREF(key_obj); Py_XINCREF(obj); return obj; @@ -11320,6 +11321,11 @@ static SIP_SSIZE_T sipSimpleWrapper_getcharbuffer(sipSimpleWrapper *self, */ static void sipSimpleWrapper_dealloc(sipSimpleWrapper *self) { + PyObject *error_type, *error_value, *error_traceback; + + /* Save the current exception, if any. */ + PyErr_Fetch(&error_type, &error_value, &error_traceback); + forgetObject(self); /* @@ -11331,6 +11337,9 @@ static void sipSimpleWrapper_dealloc(sipSimpleWrapper *self) /* Call the standard super-type dealloc. */ PyBaseObject_Type.tp_dealloc((PyObject *)self); + + /* Restore the saved exception. */ + PyErr_Restore(error_type, error_value, error_traceback); } @@ -11727,6 +11736,11 @@ static int sipWrapper_clear(sipWrapper *self) */ static void sipWrapper_dealloc(sipWrapper *self) { + PyObject *error_type, *error_value, *error_traceback; + + /* Save the current exception, if any. */ + PyErr_Fetch(&error_type, &error_value, &error_traceback); + /* * We can't simply call the super-type because things have to be done in a * certain order. The first thing is to get rid of the wrapped instance. @@ -11737,6 +11751,9 @@ static void sipWrapper_dealloc(sipWrapper *self) /* Skip the super-type's dealloc. */ PyBaseObject_Type.tp_dealloc((PyObject *)self); + + /* Restore the saved exception. */ + PyErr_Restore(error_type, error_value, error_traceback); } diff --git a/wscript b/wscript index b28b55ed..2eea2600 100644 --- a/wscript +++ b/wscript @@ -79,7 +79,7 @@ def configure(conf): # Visual Studio 2017. However, waf is using "msvc 15.0" to designate # that version rather than "14.1" so we'll need to catch that case and # fix up the msvc_version accordingly. - if msvc_version == "14.1" and sys.version_info >= (3,7): + if msvc_version in ["14.1", "14.2"] and sys.version_info >= (3,7): ##msvc_version = '15.0' # On the other hand, microsoft says that v141 and v140 (Visual diff --git a/wx/include/wxPython/sip.h b/wx/include/wxPython/sip.h index bcb53ab2..5dc022ee 100644 --- a/wx/include/wxPython/sip.h +++ b/wx/include/wxPython/sip.h @@ -1,7 +1,7 @@ /* * The SIP module interface. * - * Copyright (c) 2018 Riverbank Computing Limited + * Copyright (c) 2020 Riverbank Computing Limited * * This file is part of SIP. * @@ -54,8 +54,8 @@ extern "C" { /* * Define the SIP version number. */ -#define SIP_VERSION 0x041313 -#define SIP_VERSION_STR "4.19.19" +#define SIP_VERSION 0x041317 +#define SIP_VERSION_STR "4.19.23" /*