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 000000000000000..91c8f3c3949df06 --- /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 fbea1f67a36f442..7cf1f975a983515 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();