From 938e36f824c5f834d6b77d47942ad81edd5491d0 Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Wed, 1 Mar 2023 01:31:21 +0100 Subject: gh-102336: Remove code specifically for handling Windows 7 (GH-102337) --- Python/fileutils.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'Python/fileutils.c') diff --git a/Python/fileutils.c b/Python/fileutils.c index 897c2f9f4e..93bee9ee00 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 -- cgit v1.2.1