mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #23524: Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
This commit is contained in:
parent
fe0a41aae4
commit
8fc8980c96
11 changed files with 150 additions and 69 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue