]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35134: Move Include/cellobject.h to Include/cpython/ (GH-28964)
authorVictor Stinner <vstinner@python.org>
Fri, 15 Oct 2021 00:39:58 +0000 (02:39 +0200)
committerGitHub <noreply@github.com>
Fri, 15 Oct 2021 00:39:58 +0000 (02:39 +0200)
Doc/whatsnew/3.11.rst
Include/Python.h
Include/cpython/cellobject.h [moved from Include/cellobject.h with 89% similarity]
Makefile.pre.in
Misc/NEWS.d/next/C API/2021-10-15-00-11-51.bpo-35134.eX4zqy.rst
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters

index a45568392fbf9f14ff51a113b6eb0b7f111fbf52..734cf1572fcba4adacd1d11330b87c3f2854153b 100644 (file)
@@ -572,10 +572,11 @@ Porting to Python 3.11
   header provides functions like ``printf()`` and ``fopen()``.
   (Contributed by Victor Stinner in :issue:`45434`.)
 
-* The non-limited API file ``funcobject.h`` has been moved to the
-  ``Include/cpython`` directory. This file must not be included directly, as it
-  is already included in ``Python.h``: :ref:`Include Files <api-includes>`. If
-  it has been included directly, consider including ``Python.h`` instead.
+* The non-limited API files ``cellobject.h`` and ``funcobject.h`` have been
+  moved to the ``Include/cpython`` directory. These files must not be included
+  directly, as they are already included in ``Python.h``: :ref:`Include Files
+  <api-includes>`. If they have been included directly, consider including
+  ``Python.h`` instead.
   (Contributed by Victor Stinner in :issue:`35134`.)
 
 Deprecated
index e8e061bdf62e87efb325b862b90bf25b01c40caf..89f60fe5c9f94515f3e732457e3f8750de5facd0 100644 (file)
@@ -68,7 +68,7 @@
 #include "pyframe.h"
 #include "traceback.h"
 #include "sliceobject.h"
-#include "cellobject.h"
+#include "cpython/cellobject.h"
 #include "iterobject.h"
 #include "genobject.h"
 #include "descrobject.h"
similarity index 89%
rename from Include/cellobject.h
rename to Include/cpython/cellobject.h
index 81bc784d36f3e0e6f359386aab31f49bc9cae1f9..8dc7b8f4cf6f888da05378c5b6fe1872da50e40b 100644 (file)
@@ -1,4 +1,5 @@
 /* Cell object interface */
+
 #ifndef Py_LIMITED_API
 #ifndef Py_CELLOBJECT_H
 #define Py_CELLOBJECT_H
@@ -8,7 +9,8 @@ extern "C" {
 
 typedef struct {
     PyObject_HEAD
-    PyObject *ob_ref;       /* Content of the cell or NULL when empty */
+    /* Content of the cell or NULL when empty */
+    PyObject *ob_ref;
 } PyCellObject;
 
 PyAPI_DATA(PyTypeObject) PyCell_Type;
index a5585c8de8ad0178100a1a5b746613859104d160..32bbab068f7027981fb61fcf1b12298db5c0647b 100644 (file)
@@ -1127,7 +1127,6 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/boolobject.h \
                $(srcdir)/Include/bytearrayobject.h \
                $(srcdir)/Include/bytesobject.h \
-               $(srcdir)/Include/cellobject.h \
                $(srcdir)/Include/ceval.h \
                $(srcdir)/Include/classobject.h \
                $(srcdir)/Include/code.h \
@@ -1201,6 +1200,7 @@ PYTHON_HEADERS= \
                $(srcdir)/Include/cpython/abstract.h \
                $(srcdir)/Include/cpython/bytearrayobject.h \
                $(srcdir)/Include/cpython/bytesobject.h \
+               $(srcdir)/Include/cpython/cellobject.h \
                $(srcdir)/Include/cpython/ceval.h \
                $(srcdir)/Include/cpython/code.h \
                $(srcdir)/Include/cpython/compile.h \
index fc12e02b0c580ebb68c1aec1bad1371b587da926..800f6e7f927410a2068ae2e411f88af8d886ad97 100644 (file)
@@ -1,3 +1,3 @@
-Move Include/funcobject.h header file to Include/cpython/funcobject.h.
-C extensions should only include the main ``<Python.h>`` header.
-Patch by Victor Stinner.
+Move ``cellobject.h`` and ``funcobject.h`` header files from ``Include/`` to
+``Include/cpython/``. C extensions should only include the main ``<Python.h>``
+header. Patch by Victor Stinner.
index dc216e34855df2a0ca87e43c40c2852fd507bb53..877064e877debe2a730f1a989a5fd0bb9a796856 100644 (file)
     <ClInclude Include="..\Include\boolobject.h" />
     <ClInclude Include="..\Include\bytearrayobject.h" />
     <ClInclude Include="..\Include\bytesobject.h" />
-    <ClInclude Include="..\Include\cellobject.h" />
     <ClInclude Include="..\Include\ceval.h" />
     <ClInclude Include="..\Include\classobject.h" />
     <ClInclude Include="..\Include\code.h" />
     <ClInclude Include="..\Include\cpython\abstract.h" />
     <ClInclude Include="..\Include\cpython\bytearrayobject.h" />
     <ClInclude Include="..\Include\cpython\bytesobject.h" />
+    <ClInclude Include="..\Include\cpython\cellobject.h" />
     <ClInclude Include="..\Include\cpython\ceval.h" />
     <ClInclude Include="..\Include\cpython\code.h" />
     <ClInclude Include="..\Include\cpython\compile.h" />
index 8eeb38871f327e1f7ef072ede208e11d289b9a34..b8841c90cc1b96596956c2d5ac0cdb2938eac8cd 100644 (file)
@@ -51,9 +51,6 @@
     <ClInclude Include="..\Include\bytesobject.h">
       <Filter>Include</Filter>
     </ClInclude>
-    <ClInclude Include="..\Include\cellobject.h">
-      <Filter>Include</Filter>
-    </ClInclude>
     <ClInclude Include="..\Include\ceval.h">
       <Filter>Include</Filter>
     </ClInclude>
     <ClInclude Include="..\Include\cpython\bytesobject.h">
       <Filter>Include\cpython</Filter>
     </ClInclude>
+    <ClInclude Include="..\Include\cpython\cellobject.h">
+      <Filter>Include\cpython</Filter>
+    </ClInclude>
     <ClInclude Include="..\Include\cpython\ceval.h">
       <Filter>Include\cpython</Filter>
     </ClInclude>