summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-29 02:18:52 (GMT)
committerGitHub <noreply@github.com>2023-08-29 02:18:52 (GMT)
commit15c5a50797020944e9ccb72bf3e28c3cca2e35c3 (patch)
tree19d539d1c82456c79cb8a7d4f45bd117a60fdead /Include/cpython
parent301eb7e607be6ea15c7a1e792f1cb927ba423932 (diff)
downloadcpython-15c5a50797020944e9ccb72bf3e28c3cca2e35c3.zip
cpython-15c5a50797020944e9ccb72bf3e28c3cca2e35c3.tar.gz
cpython-15c5a50797020944e9ccb72bf3e28c3cca2e35c3.tar.bz2
gh-106320: Remove private pythonrun API (#108599)
Remove these private functions from the public C API: * _PyRun_AnyFileObject() * _PyRun_InteractiveLoopObject() * _PyRun_SimpleFileObject() * _Py_SourceAsString() Move them to the internal C API: add a new pycore_pythonrun.h header file. No longer export these functions.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/pythonrun.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/Include/cpython/pythonrun.h b/Include/cpython/pythonrun.h
index 3b2537e..edc4095 100644
--- a/Include/cpython/pythonrun.h
+++ b/Include/cpython/pythonrun.h
@@ -3,21 +3,11 @@
#endif
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
-PyAPI_FUNC(int) _PyRun_SimpleFileObject(
- FILE *fp,
- PyObject *filename,
- int closeit,
- PyCompilerFlags *flags);
PyAPI_FUNC(int) PyRun_AnyFileExFlags(
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
int closeit,
PyCompilerFlags *flags);
-PyAPI_FUNC(int) _PyRun_AnyFileObject(
- FILE *fp,
- PyObject *filename,
- int closeit,
- PyCompilerFlags *flags);
PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
@@ -35,10 +25,6 @@ PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
FILE *fp,
const char *filename, /* decoded from the filesystem encoding */
PyCompilerFlags *flags);
-PyAPI_FUNC(int) _PyRun_InteractiveLoopObject(
- FILE *fp,
- PyObject *filename,
- PyCompilerFlags *flags);
PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
@@ -69,15 +55,6 @@ PyAPI_FUNC(PyObject *) Py_CompileStringObject(
#define Py_CompileString(str, p, s) Py_CompileStringExFlags((str), (p), (s), NULL, -1)
#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags((str), (p), (s), (f), -1)
-
-PyAPI_FUNC(const char *) _Py_SourceAsString(
- PyObject *cmd,
- const char *funcname,
- const char *what,
- PyCompilerFlags *cf,
- PyObject **cmd_copy);
-
-
/* A function flavor is also exported by libpython. It is required when
libpython is accessed directly rather than using header files which defines
macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to
@@ -114,7 +91,6 @@ PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject
#define PyRun_FileFlags(fp, p, s, g, l, flags) \
PyRun_FileExFlags((fp), (p), (s), (g), (l), 0, (flags))
-
/* Stuff with no proper home (yet) */
PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);