mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-118422: Fix run_fileexflags() test (#118429)
Don't test the undefined behavior of fileno() on a closed file, but use fstat() as a reliable test if the file was closed or not.
This commit is contained in:
parent
587388ff22
commit
e93c39b47e
4 changed files with 62 additions and 58 deletions
|
@ -326,6 +326,9 @@ extern int _PyFile_Flush(PyObject *);
|
|||
extern int _Py_GetTicksPerSecond(long *ticks_per_second);
|
||||
#endif
|
||||
|
||||
// Export for '_testcapi' shared extension
|
||||
PyAPI_FUNC(int) _Py_IsValidFD(int fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue