From 2a99495b5b7e9f1857b1a33eb11ea059525945a9 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 14:05:33 +0800 Subject: [PATCH 01/10] modified: Include/datetime.h modified: Include/internal/mimalloc/mimalloc.h modified: Include/internal/mimalloc/mimalloc/atomic.h modified: Include/internal/mimalloc/mimalloc/internal.h modified: Include/internal/mimalloc/mimalloc/prim.h modified: Include/internal/mimalloc/mimalloc/track.h modified: Include/internal/mimalloc/mimalloc/types.h --- Include/datetime.h | 6 +++--- Include/internal/mimalloc/mimalloc.h | 4 ++-- Include/internal/mimalloc/mimalloc/atomic.h | 6 +++--- Include/internal/mimalloc/mimalloc/internal.h | 4 ++-- Include/internal/mimalloc/mimalloc/prim.h | 6 +++--- Include/internal/mimalloc/mimalloc/track.h | 4 ++-- Include/internal/mimalloc/mimalloc/types.h | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Include/datetime.h b/Include/datetime.h index b78cc0e8e2e5ac..ed36e6e48c87d2 100644 --- a/Include/datetime.h +++ b/Include/datetime.h @@ -1,8 +1,8 @@ /* datetime.h */ #ifndef Py_LIMITED_API -#ifndef DATETIME_H -#define DATETIME_H +#ifndef Py_DATETIME_H +#define Py_DATETIME_H #ifdef __cplusplus extern "C" { #endif @@ -263,5 +263,5 @@ static PyDateTime_CAPI *PyDateTimeAPI = NULL; #ifdef __cplusplus } #endif -#endif +#endif /* !Py_DATETIME_H */ #endif /* !Py_LIMITED_API */ diff --git a/Include/internal/mimalloc/mimalloc.h b/Include/internal/mimalloc/mimalloc.h index 821129e7690b1b..28c8372ed37746 100644 --- a/Include/internal/mimalloc/mimalloc.h +++ b/Include/internal/mimalloc/mimalloc.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_H -#define MIMALLOC_H +#ifndef Py_MIMALLOC_H +#define Py_MIMALLOC_H #define MI_MALLOC_VERSION 212 // major + 2 digits minor diff --git a/Include/internal/mimalloc/mimalloc/atomic.h b/Include/internal/mimalloc/mimalloc/atomic.h index 65fa477d643782..2d0982540a5a09 100644 --- a/Include/internal/mimalloc/mimalloc/atomic.h +++ b/Include/internal/mimalloc/mimalloc/atomic.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_ATOMIC_H -#define MIMALLOC_ATOMIC_H +#ifndef Py_MIMALLOC_ATOMIC_H +#define Py_MIMALLOC_ATOMIC_H // -------------------------------------------------------------------------------------------- // Atomics @@ -389,4 +389,4 @@ static inline void mi_atomic_yield(void) { #endif -#endif // __MIMALLOC_ATOMIC_H +#endif // Py_MIMALLOC_ATOMIC_H diff --git a/Include/internal/mimalloc/mimalloc/internal.h b/Include/internal/mimalloc/mimalloc/internal.h index a7daa3a40a4c0b..85ca0c2e740a4f 100644 --- a/Include/internal/mimalloc/mimalloc/internal.h +++ b/Include/internal/mimalloc/mimalloc/internal.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_INTERNAL_H -#define MIMALLOC_INTERNAL_H +#ifndef Py_MIMALLOC_INTERNAL_H +#define Py_MIMALLOC_INTERNAL_H // -------------------------------------------------------------------------- diff --git a/Include/internal/mimalloc/mimalloc/prim.h b/Include/internal/mimalloc/mimalloc/prim.h index 322ab29e6b41c2..be1dbd5f82790b 100644 --- a/Include/internal/mimalloc/mimalloc/prim.h +++ b/Include/internal/mimalloc/mimalloc/prim.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_PRIM_H -#define MIMALLOC_PRIM_H +#ifndef Py_MIMALLOC_PRIM_H +#define Py_MIMALLOC_PRIM_H // -------------------------------------------------------------------------- @@ -326,4 +326,4 @@ static inline mi_heap_t* mi_prim_get_default_heap(void) { -#endif // MIMALLOC_PRIM_H +#endif // Py_MIMALLOC_PRIM_H diff --git a/Include/internal/mimalloc/mimalloc/track.h b/Include/internal/mimalloc/mimalloc/track.h index fa1a048d846a9c..9ac12e5e542205 100644 --- a/Include/internal/mimalloc/mimalloc/track.h +++ b/Include/internal/mimalloc/mimalloc/track.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_TRACK_H -#define MIMALLOC_TRACK_H +#ifndef Py_MIMALLOC_TRACK_H +#define Py_MIMALLOC_TRACK_H /* ------------------------------------------------------------------------------------------------------ Track memory ranges with macros for tools like Valgrind address sanitizer, or other memory checkers. diff --git a/Include/internal/mimalloc/mimalloc/types.h b/Include/internal/mimalloc/mimalloc/types.h index 19e93224174314..5df0bf586c8a64 100644 --- a/Include/internal/mimalloc/mimalloc/types.h +++ b/Include/internal/mimalloc/mimalloc/types.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef MIMALLOC_TYPES_H -#define MIMALLOC_TYPES_H +#ifndef Py_MIMALLOC_TYPES_H +#define Py_MIMALLOC_TYPES_H // -------------------------------------------------------------------------- // This file contains the main type definitions for mimalloc: From 642ad1bc8979f6ae23ab140d6f8e5fe4d6a3bd56 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 14:28:36 +0800 Subject: [PATCH 02/10] add news --- .../next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst diff --git a/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst b/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst new file mode 100644 index 00000000000000..2c9d91f489e26d --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst @@ -0,0 +1 @@ +Rename the head including control macros which do not start with "Py" From 29f983fdc80740301c483453509cd36acc908d25 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:43:57 +0800 Subject: [PATCH 03/10] Cancel change --- Include/internal/mimalloc/mimalloc/atomic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc/atomic.h b/Include/internal/mimalloc/mimalloc/atomic.h index 2d0982540a5a09..4b7bb60384e028 100644 --- a/Include/internal/mimalloc/mimalloc/atomic.h +++ b/Include/internal/mimalloc/mimalloc/atomic.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_ATOMIC_H -#define Py_MIMALLOC_ATOMIC_H +#ifndef MIMALLOC_ATOMIC_H +#define MIMALLOC_ATOMIC_H // -------------------------------------------------------------------------------------------- // Atomics @@ -389,4 +389,4 @@ static inline void mi_atomic_yield(void) { #endif -#endif // Py_MIMALLOC_ATOMIC_H +#endif // MIMALLOC_ATOMIC_H From d074a1381b6a114d5e5af6318ccfa373b1c25c7f Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:44:53 +0800 Subject: [PATCH 04/10] cancel change on atomic.h --- Include/internal/mimalloc/mimalloc/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/mimalloc/mimalloc/atomic.h b/Include/internal/mimalloc/mimalloc/atomic.h index 4b7bb60384e028..65fa477d643782 100644 --- a/Include/internal/mimalloc/mimalloc/atomic.h +++ b/Include/internal/mimalloc/mimalloc/atomic.h @@ -389,4 +389,4 @@ static inline void mi_atomic_yield(void) { #endif -#endif // MIMALLOC_ATOMIC_H +#endif // __MIMALLOC_ATOMIC_H From c71fc7afc657119ffd0cb45234fc2cc5a5da61f0 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:45:39 +0800 Subject: [PATCH 05/10] Cancel change on mimalloc.h --- Include/internal/mimalloc/mimalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc.h b/Include/internal/mimalloc/mimalloc.h index 28c8372ed37746..821129e7690b1b 100644 --- a/Include/internal/mimalloc/mimalloc.h +++ b/Include/internal/mimalloc/mimalloc.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_H -#define Py_MIMALLOC_H +#ifndef MIMALLOC_H +#define MIMALLOC_H #define MI_MALLOC_VERSION 212 // major + 2 digits minor From c9074bb2c3962c8e6766908766cce759a8db1b52 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:46:14 +0800 Subject: [PATCH 06/10] Cancel change in internal.h --- Include/internal/mimalloc/mimalloc/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc/internal.h b/Include/internal/mimalloc/mimalloc/internal.h index 85ca0c2e740a4f..a7daa3a40a4c0b 100644 --- a/Include/internal/mimalloc/mimalloc/internal.h +++ b/Include/internal/mimalloc/mimalloc/internal.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_INTERNAL_H -#define Py_MIMALLOC_INTERNAL_H +#ifndef MIMALLOC_INTERNAL_H +#define MIMALLOC_INTERNAL_H // -------------------------------------------------------------------------- From ce1cc0aa551fdbd58fade61efbd660be1cd8752f Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:47:03 +0800 Subject: [PATCH 07/10] Cancel change in prim.h --- Include/internal/mimalloc/mimalloc/prim.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc/prim.h b/Include/internal/mimalloc/mimalloc/prim.h index be1dbd5f82790b..322ab29e6b41c2 100644 --- a/Include/internal/mimalloc/mimalloc/prim.h +++ b/Include/internal/mimalloc/mimalloc/prim.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_PRIM_H -#define Py_MIMALLOC_PRIM_H +#ifndef MIMALLOC_PRIM_H +#define MIMALLOC_PRIM_H // -------------------------------------------------------------------------- @@ -326,4 +326,4 @@ static inline mi_heap_t* mi_prim_get_default_heap(void) { -#endif // Py_MIMALLOC_PRIM_H +#endif // MIMALLOC_PRIM_H From ca6272b981c517a59a70a0694fa9eb44b92b0b31 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:47:56 +0800 Subject: [PATCH 08/10] Cancel change in track.h --- Include/internal/mimalloc/mimalloc/track.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc/track.h b/Include/internal/mimalloc/mimalloc/track.h index 9ac12e5e542205..fa1a048d846a9c 100644 --- a/Include/internal/mimalloc/mimalloc/track.h +++ b/Include/internal/mimalloc/mimalloc/track.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_TRACK_H -#define Py_MIMALLOC_TRACK_H +#ifndef MIMALLOC_TRACK_H +#define MIMALLOC_TRACK_H /* ------------------------------------------------------------------------------------------------------ Track memory ranges with macros for tools like Valgrind address sanitizer, or other memory checkers. From 132b99900a2ca802302ea99f9216a2bc25ff34ba Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Thu, 13 Nov 2025 21:48:26 +0800 Subject: [PATCH 09/10] Update types.h --- Include/internal/mimalloc/mimalloc/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Include/internal/mimalloc/mimalloc/types.h b/Include/internal/mimalloc/mimalloc/types.h index 5df0bf586c8a64..19e93224174314 100644 --- a/Include/internal/mimalloc/mimalloc/types.h +++ b/Include/internal/mimalloc/mimalloc/types.h @@ -5,8 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef Py_MIMALLOC_TYPES_H -#define Py_MIMALLOC_TYPES_H +#ifndef MIMALLOC_TYPES_H +#define MIMALLOC_TYPES_H // -------------------------------------------------------------------------- // This file contains the main type definitions for mimalloc: From 3aac026f4b3f1b3c13e47e158f1c4ffddf5747e2 Mon Sep 17 00:00:00 2001 From: Locked-chess-official <13140752715@163.com> Date: Fri, 14 Nov 2025 10:59:37 +0800 Subject: [PATCH 10/10] Delete Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst --- .../next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst diff --git a/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst b/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst deleted file mode 100644 index 2c9d91f489e26d..00000000000000 --- a/Misc/NEWS.d/next/C_API/2025-11-13-14-28-21.gh-issue-141488.z3saMw.rst +++ /dev/null @@ -1 +0,0 @@ -Rename the head including control macros which do not start with "Py"