summaryrefslogtreecommitdiffstats
path: root/Python/fileutils.c
diff options
context:
space:
mode:
authorMax Bachmann <kontakt@maxbachmann.de>2023-03-01 00:31:21 (GMT)
committerGitHub <noreply@github.com>2023-03-01 00:31:21 (GMT)
commit938e36f824c5f834d6b77d47942ad81edd5491d0 (patch)
tree50995f866619e76b3ce900c60859ab64e4e0621c /Python/fileutils.c
parent360ef843d8fc03aad38ed84f9f45026ab08ca4f4 (diff)
downloadcpython-938e36f824c5f834d6b77d47942ad81edd5491d0.zip
cpython-938e36f824c5f834d6b77d47942ad81edd5491d0.tar.gz
cpython-938e36f824c5f834d6b77d47942ad81edd5491d0.tar.bz2
gh-102336: Remove code specifically for handling Windows 7 (GH-102337)
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r--Python/fileutils.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c
index 897c2f9..93bee9e 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -1362,17 +1362,11 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
else
flags = 0;
- /* This check can be removed once support for Windows 7 ends. */
-#define CONSOLE_PSEUDOHANDLE(handle) (((ULONG_PTR)(handle) & 0x3) == 0x3 && \
- GetFileType(handle) == FILE_TYPE_CHAR)
-
- if (!CONSOLE_PSEUDOHANDLE(handle) &&
- !SetHandleInformation(handle, HANDLE_FLAG_INHERIT, flags)) {
+ if (!SetHandleInformation(handle, HANDLE_FLAG_INHERIT, flags)) {
if (raise)
PyErr_SetFromWindowsErr(0);
return -1;
}
-#undef CONSOLE_PSEUDOHANDLE
return 0;
#else