[PyQt] sipdistutils.py - broken exceptions flags in VC++
phil at riverbankcomputing.com
Tue Nov 4 20:05:06 GMT 2014
On 04/11/2014 7:50 pm, Matteo Italia wrote:
> So nobody is using setup.py to build SIP extensions? Is there any place
> where to send patches, anyhow?
I don't want to make changes to sipdistutils.py at this stage. I don't
recommend using it and it won't be part of sip5.
> Il 27/10/2014 23:27, Matteo Italia wrote:
>> when building a Python 2.7 extension on Windows (with VC++ 2008)
>> sipdistutils.py, I spotted several warning about wrong exception
>> The issue seems to be that distutils only bothers to provide a
>> with build options adequate for C extensions
>> (http://bugs.python.org/issue1222585), while we need C++ settings. For
>> this reason, no /EH flag is provided, and we end up building
>> with broken exception semantic (in particular, RAII seems to be
>> completely broken when no /EH is provided, and catch(...) catches also
>> SEH exceptions, which is _extremely_ bad).
>> To fix this issue, I patched sipdistutils.py to add the adequate
>> exception specification option (/EHsc) if not present (and complain if
>> some /EH which is not /EHsc is already present); attached you can find
>> the diff against the sipdistutils.py in the current repository (since
>> already goes on checking command line arguments, there's also a check
>> remove -Wstrict-prototypes on Unix, which just generates noise in the
>> Could someone check if it looks ok and if it can be eventually merged
>> back in SIP? I already had several bizarre crashes that could be
>> back to this problem, so I think that this may be useful to others.
> PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt