Issue #23524: Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.

This commit is contained in:
Steve Dower 2015-04-12 00:26:27 -04:00
parent fe0a41aae4
commit 8fc8980c96
11 changed files with 150 additions and 69 deletions

View file

@ -15,8 +15,8 @@ static void __cdecl _silent_invalid_parameter_handler(
unsigned int line,
uintptr_t pReserved) { }
void *_Py_silent_invalid_parameter_handler =
(void*)_silent_invalid_parameter_handler;
_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler;
#endif
#endif

View file

@ -149,7 +149,9 @@ msvcrt_get_osfhandle(PyObject *self, PyObject *args)
if (!_PyVerify_fd(fd))
return PyErr_SetFromErrno(PyExc_IOError);
_Py_BEGIN_SUPPRESS_IPH
handle = _get_osfhandle(fd);
_Py_END_SUPPRESS_IPH
if (handle == -1)
return PyErr_SetFromErrno(PyExc_IOError);