From dd7719fa185ea0cf2ea2867a3b3dda219a6b2114 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 9 May 2026 10:17:26 +0200 Subject: [PATCH] Reorder librt Python.h includes --- mypyc/lib-rt/CPy.h | 2 +- mypyc/lib-rt/byteswriter_extra_ops.h | 2 +- mypyc/lib-rt/function_wrapper.c | 2 +- mypyc/lib-rt/pythonsupport.h | 2 +- mypyc/lib-rt/strings/librt_strings.h | 2 +- mypyc/lib-rt/strings/librt_strings_api.h | 2 +- mypyc/lib-rt/stringwriter_extra_ops.h | 2 +- mypyc/lib-rt/test_capi.cc | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mypyc/lib-rt/CPy.h b/mypyc/lib-rt/CPy.h index 89ef4d0749a45..c22c4162669bd 100644 --- a/mypyc/lib-rt/CPy.h +++ b/mypyc/lib-rt/CPy.h @@ -3,8 +3,8 @@ #ifndef CPY_CPY_H #define CPY_CPY_H -#include #include +#include #include #include #include diff --git a/mypyc/lib-rt/byteswriter_extra_ops.h b/mypyc/lib-rt/byteswriter_extra_ops.h index dc715600653d5..4aec322a730cd 100644 --- a/mypyc/lib-rt/byteswriter_extra_ops.h +++ b/mypyc/lib-rt/byteswriter_extra_ops.h @@ -1,9 +1,9 @@ #ifndef BYTESWRITER_EXTRA_OPS_H #define BYTESWRITER_EXTRA_OPS_H +#include #include #include -#include #include "mypyc_util.h" #include "strings/librt_strings_api.h" diff --git a/mypyc/lib-rt/function_wrapper.c b/mypyc/lib-rt/function_wrapper.c index ccb1824d24b4a..348c3316cd258 100644 --- a/mypyc/lib-rt/function_wrapper.c +++ b/mypyc/lib-rt/function_wrapper.c @@ -1,6 +1,6 @@ #define PY_SSIZE_T_CLEAN -#include #include "CPy.h" +#include #define CPyFunction_weakreflist(f) (((PyCFunctionObject *)f)->m_weakreflist) #define CPyFunction_class(f) ((PyObject*) ((PyCMethodObject *) (f))->mm_class) diff --git a/mypyc/lib-rt/pythonsupport.h b/mypyc/lib-rt/pythonsupport.h index 4c82ff6a3c037..1b0583543fe48 100644 --- a/mypyc/lib-rt/pythonsupport.h +++ b/mypyc/lib-rt/pythonsupport.h @@ -6,8 +6,8 @@ #ifndef CPY_PYTHONSUPPORT_H #define CPY_PYTHONSUPPORT_H -#include #include +#include #include "pythoncapi_compat.h" #include #include diff --git a/mypyc/lib-rt/strings/librt_strings.h b/mypyc/lib-rt/strings/librt_strings.h index 0bf1587e6f44f..e6236f7950929 100644 --- a/mypyc/lib-rt/strings/librt_strings.h +++ b/mypyc/lib-rt/strings/librt_strings.h @@ -1,8 +1,8 @@ #ifndef LIBRT_STRINGS_H #define LIBRT_STRINGS_H -#include #include +#include #include "librt_strings_common.h" // ABI version -- only an exact match is compatible. This will only be changed in diff --git a/mypyc/lib-rt/strings/librt_strings_api.h b/mypyc/lib-rt/strings/librt_strings_api.h index f0bb761bcaa2e..536b90ad7f21c 100644 --- a/mypyc/lib-rt/strings/librt_strings_api.h +++ b/mypyc/lib-rt/strings/librt_strings_api.h @@ -4,8 +4,8 @@ int import_librt_strings(void); -#include #include +#include #include "librt_strings.h" extern void *LibRTStrings_API[LIBRT_STRINGS_API_LEN]; diff --git a/mypyc/lib-rt/stringwriter_extra_ops.h b/mypyc/lib-rt/stringwriter_extra_ops.h index 0da9a4d9d7f71..bac6dd6b3e95c 100644 --- a/mypyc/lib-rt/stringwriter_extra_ops.h +++ b/mypyc/lib-rt/stringwriter_extra_ops.h @@ -1,9 +1,9 @@ #ifndef STRINGWRITER_EXTRA_OPS_H #define STRINGWRITER_EXTRA_OPS_H +#include #include #include -#include #include "mypyc_util.h" #include "strings/librt_strings_api.h" diff --git a/mypyc/lib-rt/test_capi.cc b/mypyc/lib-rt/test_capi.cc index 4b183de5743e9..bf15a47e63dd1 100644 --- a/mypyc/lib-rt/test_capi.cc +++ b/mypyc/lib-rt/test_capi.cc @@ -1,8 +1,8 @@ // Test cases -#include #include #include "CPy.h" +#include static PyObject *moduleDict;