[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

Steve Dower report at bugs.python.org
Fri Feb 27 19:33:51 CET 2015


Steve Dower added the comment:

New patch, which should cover all the other uses of _PyVerify_fd outside of posixmodule.

I've moved _PyVerify_fd into fileutils (but left _PyVerify_fd_dup2 in posixmodule, as it's basically deprecated at this point).

_Py_VERIFY_FD is now in fileutils.h, and is used everywhere it makes sense. I also fixed up some error handling for _Py_fstat that was using errno on Windows rather than GetLastError() - I can split this into a separate issue if it's in the way.

_Py_BEGIN/END_SUPPRESS_IPH are now in pymacro.h as they need to be after PyAPI_DATA is defined - the silent invalid parameter handler is now defined in PC/invalid_parameter_handler.c but setting and restoring it need to be in macros.

Builds are fine on VS 2015 CTP 6 (with this code enabled) and VS 2013 (with the old code enabled), and I'm getting set up to test a Linux build with the patch.

----------
Added file: http://bugs.python.org/file38264/23524_2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23524>
_______________________________________


More information about the Python-bugs-list mailing list