https://github.com/python/cpython/commit/6be17baeb5bcfc78f0b7fcfe5221df0744c865e8
commit: 6be17baeb5bcfc78f0b7fcfe5221df0744c865e8
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2025-06-26T13:05:01+02:00
summary:
gh-135755: Use private names (_Py*) for header file guards new in 3.14
(GH-135921)
These are private API; let's name new ones accordingly.
files:
M Include/audit.h
M Include/cpython/audit.h
M Include/refcount.h
diff --git a/Include/audit.h b/Include/audit.h
index 793b7077e1027b..9be54ad4411096 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 3c5c7a8c06091d..536f9248632097 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 ebd1dba6d15e1a..034c453f449f5b 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
@@ -561,4 +561,4 @@ static inline PyObject* _Py_XNewRef(PyObject *obj)
#ifdef __cplusplus
}
#endif
-#endif // !Py_REFCOUNT_H
+#endif // !_Py_REFCOUNT_H
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]