From c6300cb097879a19ef3aec80189d7c465622ef04 Mon Sep 17 00:00:00 2001 From: thexai <58434170+thexai@users.noreply.github.com> Date: Sun, 28 Jun 2026 10:29:58 +0200 Subject: [PATCH] gh-152433: Windows: enable mmapmodule for UWP --- Modules/mmapmodule.c | 4 ++-- PC/config.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 6fb04ba7bd47c6..cbf40365e4f41b 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -338,7 +338,7 @@ _PyErr_SetFromNTSTATUS(ULONG status) } #endif -#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH) +#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH) #define HANDLE_INVALID_MEM(sourcecode) \ do { \ EXCEPTION_RECORD record; \ @@ -364,7 +364,7 @@ do { \ } while (0) #endif -#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH) +#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH) #define HANDLE_INVALID_MEM_METHOD(self, sourcecode) \ do { \ EXCEPTION_RECORD record; \ diff --git a/PC/config.c b/PC/config.c index 51b46c64d99b81..dcccc6a3a6d016 100644 --- a/PC/config.c +++ b/PC/config.c @@ -140,7 +140,7 @@ struct _inittab _PyImport_Inittab[] = { {"itertools", PyInit_itertools}, {"_collections", PyInit__collections}, {"_symtable", PyInit__symtable}, -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) +#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) || defined(MS_WINDOWS_APP) {"mmap", PyInit_mmap}, #endif {"_csv", PyInit__csv},