summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-09 20:26:36 (GMT)
committerGitHub <noreply@github.com>2024-05-09 20:26:36 (GMT)
commit0a23970478a8e10476f4c3095060ef00e07826a2 (patch)
treea833223bfa231d6d614debf152bb83507686fbb7 /Include
parent846cfb9a67fa4bdb81cd482a4a9e41a089ea80b3 (diff)
downloadcpython-0a23970478a8e10476f4c3095060ef00e07826a2.zip
cpython-0a23970478a8e10476f4c3095060ef00e07826a2.tar.gz
cpython-0a23970478a8e10476f4c3095060ef00e07826a2.tar.bz2
[3.13] gh-116984: Make mimalloc header includes relative to the current file (GH-118808) (#118866)
Some embedders and extensions include parts of the internal API. The pycore_mimalloc.h file is transitively include by a number of other internal headers. This avoids include errors for code that was already including those headers. (cherry picked from commit 71cc0651e79041abd648595f3030dfa41009137a) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/mimalloc/mimalloc/internal.h4
-rw-r--r--Include/internal/mimalloc/mimalloc/types.h2
-rw-r--r--Include/internal/pycore_mimalloc.h6
3 files changed, 6 insertions, 6 deletions
diff --git a/Include/internal/mimalloc/mimalloc/internal.h b/Include/internal/mimalloc/mimalloc/internal.h
index 8af841c..94f88fb 100644
--- a/Include/internal/mimalloc/mimalloc/internal.h
+++ b/Include/internal/mimalloc/mimalloc/internal.h
@@ -14,8 +14,8 @@ terms of the MIT license. A copy of the license can be found in the file
// functions and macros.
// --------------------------------------------------------------------------
-#include "mimalloc/types.h"
-#include "mimalloc/track.h"
+#include "types.h"
+#include "track.h"
#if (MI_DEBUG>0)
#define mi_trace_message(...) _mi_trace_message(__VA_ARGS__)
diff --git a/Include/internal/mimalloc/mimalloc/types.h b/Include/internal/mimalloc/mimalloc/types.h
index 17e4408..354839b 100644
--- a/Include/internal/mimalloc/mimalloc/types.h
+++ b/Include/internal/mimalloc/mimalloc/types.h
@@ -21,7 +21,7 @@ terms of the MIT license. A copy of the license can be found in the file
#include <stddef.h> // ptrdiff_t
#include <stdint.h> // uintptr_t, uint16_t, etc
-#include "mimalloc/atomic.h" // _Atomic
+#include "atomic.h" // _Atomic
#ifdef _MSC_VER
#pragma warning(disable:4214) // bitfield is not int
diff --git a/Include/internal/pycore_mimalloc.h b/Include/internal/pycore_mimalloc.h
index 10d4513..100f78d 100644
--- a/Include/internal/pycore_mimalloc.h
+++ b/Include/internal/pycore_mimalloc.h
@@ -36,9 +36,9 @@ typedef enum {
# define MI_TSAN 1
#endif
-#include "mimalloc.h"
-#include "mimalloc/types.h"
-#include "mimalloc/internal.h"
+#include "mimalloc/mimalloc.h"
+#include "mimalloc/mimalloc/types.h"
+#include "mimalloc/mimalloc/internal.h"
#endif
#ifdef Py_GIL_DISABLED