https://github.com/python/cpython/commit/8b2433af48de8ecf9086529db0cfde8457d790f6
commit: 8b2433af48de8ecf9086529db0cfde8457d790f6
branch: main
author: thexai <[email protected]>
committer: zooba <[email protected]>
date: 2026-09-07T17:35:51+01:00
summary:

gh-152433: Allow building mimalloc for Windows UWP (GH-152477)

files:
M Objects/mimalloc/prim/windows/prim.c

diff --git a/Objects/mimalloc/prim/windows/prim.c 
b/Objects/mimalloc/prim/windows/prim.c
index a038277ad21cb04..49652f65712abbc 100644
--- a/Objects/mimalloc/prim/windows/prim.c
+++ b/Objects/mimalloc/prim/windows/prim.c
@@ -12,6 +12,7 @@ terms of the MIT license. A copy of the license can be found 
in the file
 #include "mimalloc/atomic.h"
 #include "mimalloc/prim.h"
 #include <stdio.h>   // fputs, stderr
+#include <bcrypt.h>  // NTSTATUS
 
 
 //---------------------------------------------
@@ -377,6 +378,7 @@ size_t _mi_prim_numa_node(void) {
 }
 
 size_t _mi_prim_numa_node_count(void) {
+#ifdef MS_WINDOWS_DESKTOP
   ULONG numa_max = 0;
   GetNumaHighestNodeNumber(&numa_max);
   // find the highest node number that has actual processors assigned to it. 
Issue #282
@@ -399,6 +401,9 @@ size_t _mi_prim_numa_node_count(void) {
     numa_max--;
   }
   return ((size_t)numa_max + 1);
+#else
+  return ((size_t)1);
+#endif
 }
 
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to