From d70e8ae9e6fc64d3b6f1e08b13a6d8621588de4e Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Tue, 22 Aug 2023 13:35:01 -0700 Subject: [PATCH] Move pyatomic_std/gcc/msc.h to Include/cpython Placates Tools/c-analyzer/check-c-globals.py. --- Include/{ => cpython}/pyatomic_gcc.h | 0 Include/{ => cpython}/pyatomic_msc.h | 0 Include/{ => cpython}/pyatomic_std.h | 0 Include/pyatomic.h | 6 +++--- Makefile.pre.in | 4 ++-- PCbuild/pythoncore.vcxproj | 2 +- PCbuild/pythoncore.vcxproj.filters | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) rename Include/{ => cpython}/pyatomic_gcc.h (100%) rename Include/{ => cpython}/pyatomic_msc.h (100%) rename Include/{ => cpython}/pyatomic_std.h (100%) diff --git a/Include/pyatomic_gcc.h b/Include/cpython/pyatomic_gcc.h similarity index 100% rename from Include/pyatomic_gcc.h rename to Include/cpython/pyatomic_gcc.h diff --git a/Include/pyatomic_msc.h b/Include/cpython/pyatomic_msc.h similarity index 100% rename from Include/pyatomic_msc.h rename to Include/cpython/pyatomic_msc.h diff --git a/Include/pyatomic_std.h b/Include/cpython/pyatomic_std.h similarity index 100% rename from Include/pyatomic_std.h rename to Include/cpython/pyatomic_std.h diff --git a/Include/pyatomic.h b/Include/pyatomic.h index b8ad93562eb024..ea766ed2710037 100644 --- a/Include/pyatomic.h +++ b/Include/pyatomic.h @@ -357,13 +357,13 @@ _Py_atomic_fence_release(void); #if _Py_USE_GCC_BUILTIN_ATOMICS #define Py_ATOMIC_GCC_H -#include "pyatomic_gcc.h" +#include "cpython/pyatomic_gcc.h" #elif __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__) #define Py_ATOMIC_STD_H -#include "pyatomic_std.h" +#include "cpython/pyatomic_std.h" #elif defined(_MSC_VER) #define Py_ATOMIC_MSC_H -#include "pyatomic_msc.h" +#include "cpython/pyatomic_msc.h" #else #error "define pyatomic for this platform" #endif diff --git a/Makefile.pre.in b/Makefile.pre.in index 04b230b15b8a4d..f1ed9735f9b3cd 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1655,8 +1655,6 @@ PYTHON_HEADERS= \ $(srcdir)/Include/osmodule.h \ $(srcdir)/Include/patchlevel.h \ $(srcdir)/Include/pyatomic.h \ - $(srcdir)/Include/pyatomic_gcc.h \ - $(srcdir)/Include/pyatomic_std.h \ $(srcdir)/Include/pybuffer.h \ $(srcdir)/Include/pycapsule.h \ $(srcdir)/Include/pydtrace.h \ @@ -1724,6 +1722,8 @@ PYTHON_HEADERS= \ $(srcdir)/Include/cpython/optimizer.h \ $(srcdir)/Include/cpython/picklebufobject.h \ $(srcdir)/Include/cpython/pthread_stubs.h \ + $(srcdir)/Include/cpython/pyatomic_gcc.h \ + $(srcdir)/Include/cpython/pyatomic_std.h \ $(srcdir)/Include/cpython/pyctype.h \ $(srcdir)/Include/cpython/pydebug.h \ $(srcdir)/Include/cpython/pyerrors.h \ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 1107d479c036f5..05260bee6b3f0c 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -166,6 +166,7 @@ + @@ -301,7 +302,6 @@ - diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 9f0a3f27d6381f..77eaabb4d75375 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -423,6 +423,9 @@ Include + + Include + Include @@ -777,9 +780,6 @@ Include - - Include -