Mercurial > cpython-lru_cache-weakref
diff Include/pythonrun.h @ 86966:af822a6c9faf
Issue #19512: Add PyRun_InteractiveOneObject() function
Only decode the filename once. PyRun_InteractiveOneObject() uses an identifier
for "<string>" string, so the byte string is only decoded once.
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Wed, 06 Nov 2013 18:41:07 +0100 |
| parents | 3055e61f1e66 |
| children |
line wrap: on
line diff
--- a/Include/pythonrun.h Wed Nov 06 18:28:21 2013 +0100 +++ b/Include/pythonrun.h Wed Nov 06 18:41:07 2013 +0100 @@ -63,6 +63,10 @@ FILE *fp, const char *filename, /* decoded from the filesystem encoding */ PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_InteractiveOneObject( + FILE *fp, + PyObject *filename, + PyCompilerFlags *flags); PyAPI_FUNC(int) PyRun_InteractiveLoopFlags( FILE *fp, const char *filename, /* decoded from the filesystem encoding */
