]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-152433 Allow faulthandler.c to build for Windows UWP (GH-152688)
authorthexai <58434170+thexai@users.noreply.github.com>
Wed, 1 Jul 2026 18:50:07 +0000 (20:50 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Jul 2026 18:50:07 +0000 (19:50 +0100)
Modules/faulthandler.c

index 3b0647152ceffed333c909ebe03df2929da80edd..21734d068270c5667db09676f9f834b3e1969ab4 100644 (file)
@@ -581,7 +581,7 @@ faulthandler_enable(void)
         handler->enabled = 1;
     }
 
-#ifdef MS_WINDOWS
+#ifdef MS_WINDOWS_DESKTOP
     assert(fatal_error.exc_handler == NULL);
     fatal_error.exc_handler = AddVectoredExceptionHandler(1, faulthandler_exc_handler);
 #endif
@@ -645,7 +645,7 @@ faulthandler_disable(void)
             faulthandler_disable_fatal_handler(handler);
         }
     }
-#ifdef MS_WINDOWS
+#ifdef MS_WINDOWS_DESKTOP
     if (fatal_error.exc_handler != NULL) {
         RemoveVectoredExceptionHandler(fatal_error.exc_handler);
         fatal_error.exc_handler = NULL;