summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-07-01 10:37:02 (GMT)
committerGitHub <noreply@github.com>2025-07-01 10:37:02 (GMT)
commit665a682a90e5e12b2125905cad31bf2cf85d342c (patch)
treed5a5291c2fd54ed435886a545c1983aad7a0c330
parent028901e97ffb7c10fb07fbe45229c4f37ee6067d (diff)
downloadcpython-665a682a90e5e12b2125905cad31bf2cf85d342c.zip
cpython-665a682a90e5e12b2125905cad31bf2cf85d342c.tar.gz
cpython-665a682a90e5e12b2125905cad31bf2cf85d342c.tar.bz2
[3.14] gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921) (GH-135976)
These are private API; let's name new ones accordingly. (cherry picked from commit 6be17baeb5bcfc78f0b7fcfe5221df0744c865e8) Co-authored-by: Petr Viktorin <encukou@gmail.com>
-rw-r--r--Include/audit.h10
-rw-r--r--Include/cpython/audit.h2
-rw-r--r--Include/refcount.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/Include/audit.h b/Include/audit.h
index 793b707..9be54ad 100644
--- a/Include/audit.h
+++ b/Include/audit.h
@@ -1,5 +1,5 @@
-#ifndef Py_AUDIT_H
-#define Py_AUDIT_H
+#ifndef _Py_AUDIT_H
+#define _Py_AUDIT_H
#ifdef __cplusplus
extern "C" {
#endif
@@ -18,13 +18,13 @@ PyAPI_FUNC(int) PySys_AuditTuple(
#ifndef Py_LIMITED_API
-# define Py_CPYTHON_AUDIT_H
+# define _Py_CPYTHON_AUDIT_H
# include "cpython/audit.h"
-# undef Py_CPYTHON_AUDIT_H
+# undef _Py_CPYTHON_AUDIT_H
#endif
#ifdef __cplusplus
}
#endif
-#endif /* !Py_AUDIT_H */
+#endif /* !_Py_AUDIT_H */
diff --git a/Include/cpython/audit.h b/Include/cpython/audit.h
index 3c5c7a8..536f924 100644
--- a/Include/cpython/audit.h
+++ b/Include/cpython/audit.h
@@ -1,4 +1,4 @@
-#ifndef Py_CPYTHON_AUDIT_H
+#ifndef _Py_CPYTHON_AUDIT_H
# error "this header file must not be included directly"
#endif
diff --git a/Include/refcount.h b/Include/refcount.h
index 8df981e..05f2b04 100644
--- a/Include/refcount.h
+++ b/Include/refcount.h
@@ -1,5 +1,5 @@
-#ifndef Py_REFCOUNT_H
-#define Py_REFCOUNT_H
+#ifndef _Py_REFCOUNT_H
+#define _Py_REFCOUNT_H
#ifdef __cplusplus
extern "C" {
#endif
@@ -564,4 +564,4 @@ static inline PyObject* _Py_XNewRef(PyObject *obj)
#ifdef __cplusplus
}
#endif
-#endif // !Py_REFCOUNT_H
+#endif // !_Py_REFCOUNT_H