Skip to content

Commit a5be0d8

Browse files
authored
pythongh-152433: Windows: enable mmapmodule for UWP (python#152473)
1 parent f37602a commit a5be0d8

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Restores the ``mmap`` module when CPython is built from source for specific
2+
Windows API sets.

Modules/mmapmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ _PyErr_SetFromNTSTATUS(ULONG status)
338338
}
339339
#endif
340340

341-
#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH)
341+
#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH)
342342
#define HANDLE_INVALID_MEM(sourcecode) \
343343
do { \
344344
EXCEPTION_RECORD record; \
@@ -364,7 +364,7 @@ do { \
364364
} while (0)
365365
#endif
366366

367-
#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH)
367+
#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH)
368368
#define HANDLE_INVALID_MEM_METHOD(self, sourcecode) \
369369
do { \
370370
EXCEPTION_RECORD record; \

PC/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ struct _inittab _PyImport_Inittab[] = {
140140
{"itertools", PyInit_itertools},
141141
{"_collections", PyInit__collections},
142142
{"_symtable", PyInit__symtable},
143-
#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES)
143+
#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) || defined(MS_WINDOWS_APP)
144144
{"mmap", PyInit_mmap},
145145
#endif
146146
{"_csv", PyInit__csv},

0 commit comments

Comments
 (0)