diff options
author | Victor Stinner <vstinner@python.org> | 2020-12-08 23:32:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 23:32:54 (GMT) |
commit | 550e4673be538d98b6ddf5550b3922539cf5c4b2 (patch) | |
tree | db27471f32ea5a682cb6f73004552d7dd64a23d0 /Include | |
parent | 98a54171932584883cb3973f78dd30f92d7a3a78 (diff) | |
download | cpython-550e4673be538d98b6ddf5550b3922539cf5c4b2.zip cpython-550e4673be538d98b6ddf5550b3922539cf5c4b2.tar.gz cpython-550e4673be538d98b6ddf5550b3922539cf5c4b2.tar.bz2 |
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
pymain_run_startup() now pass the filename as a Python object to
_PyRun_SimpleFileObject().
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/pythonrun.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/cpython/pythonrun.h b/Include/cpython/pythonrun.h index 4945d92..febda73 100644 --- a/Include/cpython/pythonrun.h +++ b/Include/cpython/pythonrun.h @@ -3,6 +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 */ |