8000 bpo-45434: Remove Include/eval.h header file (GH-28973) · python/cpython@105582e · GitHub
[go: up one dir, main page]

Skip to content

Commit 105582e

Browse files
authored
bpo-45434: Remove Include/eval.h header file (GH-28973)
Move Include/eval.h content into Include/ceval.h and Include/cpython/ceval.h, and remove Include/eval.h.
1 parent 063abd9 commit 105582e

File tree

11 files changed

+26
-47
lines changed

11 files changed

+26
-47
lines changed

Doc/faq/extending.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ complete example using the GNU readline library (you may want to ignore
290290

291291
#define PY_SSIZE_T_CLEAN
292292
#include <Python.h>
293-
#include <object.h>
294-
#include <compile.h>
295-
#include <eval.h>
296293

297294
int main (int argc, char* argv[])
298295
{

Doc/faq/windows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Embedding the Python interpreter in a Windows app can be summarized as follows:
212212

213213
.. code-block:: c
214214
215-
#include "python.h"
215+
#include <Python.h>
216216
...
217217
Py_Initialize(); // Initialize Python.
218218
initmyAppc(); // Initialize (import) the helper class.

Doc/whatsnew/3.11.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ Porting to Python 3.11
573573
(Contributed by Victor Stinner in :issue:`45434`.)
574574

575575
* The non-limited API files ``cellobject.h``, ``classobject.h``, ``context.h``,
576-
``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have been
577-
moved to the ``Include/cpython`` directory. These files must not be included
578-
directly, as they are already included in ``Python.h``: :ref:`Include Files
579-
<api-includes>`. If they have been included directly, consider including
580-
``Python.h`` instead.
576+
``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have been moved to
577+
the ``Include/cpython`` directory. Moreover, the ``eval.h`` header file was
578+
removed. These files must not be included directly, as they are already
579+
included in ``Python.h``: :ref:`Include Files <api-includes>`. If they have
580+
been included directly, consider including ``Python.h`` instead.
581581
(Contributed by Victor Stinner in :issue:`35134`.)
582582

583583
Deprecated

Include/Python.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
#include "import.h"
9797
#include "abstract.h"
9898
#include "bltinmodule.h"
99-
#include "eval.h"
10099
#include "cpython/pyctype.h"
101100
#include "pystrtod.h"
102101
#include "pystrcmp.h"

Include/ceval.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
/* Interface to random parts in ceval.c */
2+
13
#ifndef Py_CEVAL_H
24
#define Py_CEVAL_H
35
#ifdef __cplusplus
46
extern "C" {
57
#endif
68

79

8-
/* Interface to random parts in ceval.c */
10+
PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
11+
12+
PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
13+
PyObject *globals,
14+
PyObject *locals,
15+
PyObject *const *args, int argc,
16+
PyObject *const *kwds, int kwdc,
17+
PyObject *const *defs, int defc,
18+
PyObject *kwdefs, PyObject *closure);
919

1020
/* PyEval_CallObjectWithKeywords(), PyEval_CallObject(), PyEval_CallFunction
1121
* and PyEval_CallMethod are deprecated. Since they are officially part of the

Include/cpython/ceval.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# error "this header file must not be included directly"
33
#endif
44

5+
PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args);
6+
57
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
68
PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
79
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);

Include/eval.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

Makefile.pre.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,6 @@ PYTHON_HEADERS= \
11371137
$(srcdir)/Include/dynamic_annotations.h \
11381138
$(srcdir)/Include/enumobject.h \
11391139
$(srcdir)/Include/errcode.h \
1140-
$(srcdir)/Include/eval.h \
11411140
$(srcdir)/Include/fileobject.h \
11421141
$(srcdir)/Include/fileutils.h \
11431142
$(srcdir)/Include/floatobject.h \
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
Move ``cellobject.h``, ``classobject.h``, ``context.h``, ``funcobject.h``,
2-
``genobject.h`` and ``longintrepr.h`` header files from ``Include/`` to
3-
``Include/cpython/``. C extensions should only include the main ``<Python.h>``
4-
header. Patch by Victor Stinner.
1+
The non-limited API files ``cellobject.h``, ``classobject.h``, ``context.h``,
2+
``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have been moved to
3+
the ``Include/cpython`` directory. Moreover, the ``eval.h`` header file was
4+
removed. These files must not be included directly, as they are already
5+
included in ``Python.h``: :ref:`Include Files <api-includes>`. If they have
6+
been included directly, consider including ``Python.h`` instead.
7+
Patch by Victor Stinner.

PCbuild/pythoncore.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
<ClInclude Include="..\Include\dynamic_annotations.h" />
167167
<ClInclude Include="..\Include\enumobject.h" />
168168
<ClInclude Include="..\Include\errcode.h" />
169-
<ClInclude Include="..\Include\eval.h" />
170169
<ClInclude Include="..\Include\fileobject.h" />
171170
<ClInclude Include="..\Include\fileutils.h" />
172171
<ClInclude Include="..\Include\floatobject.h" />

PCbuild/pythoncore.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@
8484
<ClInclude Include="..\Include\errcode.h">
8585
<Filter>Include</Filter>
8686
</ClInclude>
87-
<ClInclude Include="..\Include\eval.h">
88-
<Filter>Include</Filter>
89-
</ClInclude>
9087
<ClInclude Include="..\Include\fileobject.h">
9188
<Filter>Include</Filter>
9289
</ClInclude>

0 commit comments

Comments
 (0)
0