]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 1 Jul 2025 10:37:02 +0000 (12:37 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Jul 2025 10:37:02 +0000 (12:37 +0200)
These are private API; let's name new ones accordingly.
(cherry picked from commit 6be17baeb5bcfc78f0b7fcfe5221df0744c865e8)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Include/audit.h
Include/cpython/audit.h
Include/refcount.h

index 793b7077e1027ba561237e18e807e943c24ecbfe..9be54ad44110963fcd0d0766ed78196dcaa7c365 100644 (file)
@@ -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 */
index 3c5c7a8c06091d0879cb234bee97a2475d5b702a..536f92486320974bea1a70786a36bbdbec68d902 100644 (file)
@@ -1,4 +1,4 @@
-#ifndef Py_CPYTHON_AUDIT_H
+#ifndef _Py_CPYTHON_AUDIT_H
 #  error "this header file must not be included directly"
 #endif
 
index 8df981eec1b8df783b113183204da852dc4181da..05f2b048dc17d2e2eeb8b2b56ece109713bb0ed3 100644 (file)
@@ -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