]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-136759: revert rename `lock.h` to `pylock.h` (GH-137041) (#137075) (#137166)
authorKumar Aditya <kumaraditya@python.org>
Mon, 28 Jul 2025 12:19:32 +0000 (17:49 +0530)
committerGitHub <noreply@github.com>
Mon, 28 Jul 2025 12:19:32 +0000 (12:19 +0000)
Revert "[3.13] gh-136759: rename `lock.h` to `pylock.h` (GH-137041) (#137075)"

This reverts commit 74503acba7d6c563aeef307ccf2d0cee141838b0.

Include/Python.h
Include/cpython/lock.h [moved from Include/cpython/pylock.h with 100% similarity]
Include/internal/pycore_lock.h
Include/lock.h [moved from Include/pylock.h with 87% similarity]
Makefile.pre.in
Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst [deleted file]
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters

index 77c291e5d9f4107196fdae26f7f77ef641a47045..fb2d32d71104475d1505e5ab7afca980ef192ce1 100644 (file)
@@ -68,7 +68,7 @@
 #include "pybuffer.h"
 #include "pystats.h"
 #include "pyatomic.h"
-#include "pylock.h"
+#include "lock.h"
 #include "object.h"
 #include "objimpl.h"
 #include "typeslots.h"
index b4ef9caf55e2446e9da02157d46727c9da64968f..2a18bb7644725fcb3cf8391af11a6e8e7e919b36 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/pylock.h
+//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/lock.h
 #define _Py_HAS_PARKED  2
 #define _Py_ONCE_INITIALIZED 4
 
similarity index 87%
rename from Include/pylock.h
rename to Include/lock.h
index 1939ef269d3090609c2d0d049bd32c90a6171287..782b9dbc70d056994c6bbd90d6a5606ef57369d2 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 
 #ifndef Py_LIMITED_API
 #  define Py_CPYTHON_LOCK_H
-#  include "cpython/pylock.h"
+#  include "cpython/lock.h"
 #  undef Py_CPYTHON_LOCK_H
 #endif
 
index a6a6a5a556d0ce6a6272db4d748b907bed32faef..70d549589ed3bc839055fa5fbe145b10a0051158 100644 (file)
@@ -1039,7 +1039,7 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/intrcheck.h \
                $(srcdir)/Include/iterobject.h \
                $(srcdir)/Include/listobject.h \
-               $(srcdir)/Include/pylock.h \
+               $(srcdir)/Include/lock.h \
                $(srcdir)/Include/longobject.h \
                $(srcdir)/Include/marshal.h \
                $(srcdir)/Include/memoryobject.h \
@@ -1113,7 +1113,7 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/cpython/import.h \
                $(srcdir)/Include/cpython/initconfig.h \
                $(srcdir)/Include/cpython/listobject.h \
-               $(srcdir)/Include/cpython/pylock.h \
+               $(srcdir)/Include/cpython/lock.h \
                $(srcdir)/Include/cpython/longintrepr.h \
                $(srcdir)/Include/cpython/longobject.h \
                $(srcdir)/Include/cpython/memoryobject.h \
diff --git a/Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst b/Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst
deleted file mode 100644 (file)
index 79819b4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Rename ``lock.h`` to ``pylock.h`` to avoid potential include conflicts.
index e0717e336f9f8da5aa137649a0e8b66be5ddc154..70212903c83781c1b498c5794f3a529c23ffc267 100644 (file)
     <ClInclude Include="..\Include\cpython\import.h" />
     <ClInclude Include="..\Include\cpython\initconfig.h" />
     <ClInclude Include="..\Include\cpython\listobject.h" />
-    <ClInclude Include="..\Include\cpython\pylock.h" />
+    <ClInclude Include="..\Include\cpython\lock.h" />
     <ClInclude Include="..\Include\cpython\longintrepr.h" />
     <ClInclude Include="..\Include\cpython\longobject.h" />
     <ClInclude Include="..\Include\cpython\memoryobject.h" />
     <ClInclude Include="..\Include\intrcheck.h" />
     <ClInclude Include="..\Include\iterobject.h" />
     <ClInclude Include="..\Include\listobject.h" />
-    <ClInclude Include="..\Include\pylock.h" />
+    <ClInclude Include="..\Include\lock.h" />
     <ClInclude Include="..\Include\longobject.h" />
     <ClInclude Include="..\Include\marshal.h" />
     <ClInclude Include="..\Include\memoryobject.h" />
index 9d4651d8fbd96a36f4f0b0c9ff6a5b213a66afc1..3eed5a9465bca4e4f86cea5ccfad5b4d163b9323 100644 (file)
     <ClInclude Include="..\Include\listobject.h">
       <Filter>Include</Filter>
     </ClInclude>
-    <ClInclude Include="..\Include\pylock.h">
+    <ClInclude Include="..\Include\lock.h">
       <Filter>Include</Filter>
     </ClInclude>
     <ClInclude Include="..\Include\longobject.h">
     <ClInclude Include="..\Include\cpython\listobject.h">
       <Filter>Include\cpython</Filter>
     </ClInclude>
-    <ClInclude Include="..\Include\cpython\pylock.h">
+    <ClInclude Include="..\Include\cpython\lock.h">
       <Filter>Include</Filter>
     </ClInclude>
     <ClInclude Include="..\Include\cpython\longintrepr.h">