8000 bpo-35134: Move Include/cellobject.h to Include/cpython/ by vstinner · Pull Request #28964 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-35134: Move Include/cellobject.h to Include/cpython/ #28964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion Include/cellobject.h → Include/cpython/cellobject.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Cell object interface */

#ifndef Py_LIMITED_API
#ifndef Py_CELLOBJECT_H
#define Py_CELLOBJECT_H
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
8000
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
<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" />
Expand All @@ -126,6 +125,7 @@
<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" />
Expand Down
6 changes: 3 additions & 3 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -372,6 +369,9 @@
<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>
Expand Down
0