mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23668: Suppresses invalid parameter handler around chsize calls.
This commit is contained in:
parent
8fc8980c96
commit
a1c7e727c8
2 changed files with 6 additions and 0 deletions
|
@ -880,12 +880,14 @@ fileio_truncate(fileio *self, PyObject *args)
|
|||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
_Py_BEGIN_SUPPRESS_IPH
|
||||
errno = 0;
|
||||
#ifdef MS_WINDOWS
|
||||
ret = _chsize_s(fd, pos);
|
||||
#else
|
||||
ret = ftruncate(fd, pos);
|
||||
#endif
|
||||
_Py_END_SUPPRESS_IPH
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (ret != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue