]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885) (#113068)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 13 Dec 2023 21:06:43 +0000 (22:06 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2023 21:06:43 +0000 (13:06 -0800)
gh-112867: fix for WITH_PYMALLOC_RADIX_TREE=0 (GH-112885)

The _obmalloc_usage structure is only defined if the obmalloc radix tree
is enabled.
(cherry picked from commit 890ce430d94b0b2bccc92a8472b1e1030b4faeb8)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Include/internal/pycore_obmalloc.h
Misc/NEWS.d/next/Build/2023-12-08-11-33-37.gh-issue-112867.ZzDfXQ.rst [new file with mode: 0644]

index ca2a0419b4f038019eb6a1b558707d05935d2d93..b1c00654ac1c5da61ffc393cd93a6c3676dea85a 100644 (file)
@@ -665,7 +665,9 @@ struct _obmalloc_global_state {
 struct _obmalloc_state {
     struct _obmalloc_pools pools;
     struct _obmalloc_mgmt mgmt;
+#if WITH_PYMALLOC_RADIX_TREE
     struct _obmalloc_usage usage;
+#endif
 };
 
 
diff --git a/Misc/NEWS.d/next/Build/2023-12-08-11-33-37.gh-issue-112867.ZzDfXQ.rst b/Misc/NEWS.d/next/Build/2023-12-08-11-33-37.gh-issue-112867.ZzDfXQ.rst
new file mode 100644 (file)
index 0000000..a368148
--- /dev/null
@@ -0,0 +1 @@
+Fix the build for the case that WITH_PYMALLOC_RADIX_TREE=0 set.