From 2b6aff0c8e8805e2d031766d4edea94a50830ae9 Mon Sep 17 00:00:00 2001 From: thexai <58434170+thexai@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:08:58 +0200 Subject: [PATCH] gh-152433: Windows: allow build ``ceval.c`` for UWP --- .../next/Windows/2026-07-04-20-12-24.gh-issue-152433.NtWEoL.rst | 1 + Python/ceval.c | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Windows/2026-07-04-20-12-24.gh-issue-152433.NtWEoL.rst diff --git a/Misc/NEWS.d/next/Windows/2026-07-04-20-12-24.gh-issue-152433.NtWEoL.rst b/Misc/NEWS.d/next/Windows/2026-07-04-20-12-24.gh-issue-152433.NtWEoL.rst new file mode 100644 index 00000000000000..91c8f3c3949df0 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2026-07-04-20-12-24.gh-issue-152433.NtWEoL.rst @@ -0,0 +1 @@ +Allow build ``ceval.c`` for Windows UWP. diff --git a/Python/ceval.c b/Python/ceval.c index fbea1f67a36f44..7cf1f975a98351 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -131,7 +131,9 @@ hardware_stack_limits(uintptr_t *base, uintptr_t *top, uintptr_t sp) GetCurrentThreadStackLimits(&low, &high); *top = (uintptr_t)high; ULONG guarantee = 0; +#ifdef MS_WINDOWS_DESKTOP SetThreadStackGuarantee(&guarantee); +#endif *base = (uintptr_t)low + guarantee; #elif defined(__APPLE__) pthread_t this_thread = pthread_self();