Author eryksun
Recipients erikjanss, eryksun, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-05-21.05:08:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558415298.15.0.470592288697.issue36965@roundup.psfhosted.org>
In-reply-to
Content
"crtdbg.h" doesn't provide STATUS_CONTROL_C_EXIT, but it should be fine to remove it anyway. I think it was left behind by accident in 2007. It was added to support a PYTHONNOERRORWINDOW environment variable, but then this idea was dropped in favor of extending the msvcrt module:

* https://grokbase.com/t/python/python-3000/078wkax0sd/buildbots
* https://github.com/python/cpython/commit/945362cf971fb2e10f8f2a8e71e8ff10516ebe4c#diff-75445bdc3b6b3dd20b005698fa165444
* https://github.com/python/cpython/commit/3dc33d18452de871cff98914dda81ff00b4d00f6#diff-75445bdc3b6b3dd20b005698fa165444

I presume STATUS_CONTROL_C_EXIT gets included from "winnt.h" -> "Windows.h" -> "Include/internal/pycore_condvar.h" -> "Include/internal/pycore_gil.h" -> "Include/internal/pycore_pystate.h".

If [STATUS_]CONTROL_C_EXIT isn't defined, I suggest defining WIN32_LEAN_AND_MEAN before including "Windows.h". This reduces the number of included headers from about 350 down to about 200. Also, to stay strictly within the Windows API, we might want to use CONTROL_C_EXIT (from [min]winbase.h) instead of STATUS_CONTROL_C_EXIT (from "winnt.h").
History
Date User Action Args
2019-05-21 05:08:18eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, erikjanss
2019-05-21 05:08:18eryksunsetmessageid: <1558415298.15.0.470592288697.issue36965@roundup.psfhosted.org>
2019-05-21 05:08:18eryksunlinkissue36965 messages
2019-05-21 05:08:17eryksuncreate