mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
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.
This commit is contained in:
parent
4ee41c5839
commit
95701bdf40
2 changed files with 87 additions and 30 deletions
|
@ -63,6 +63,10 @@ PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
|
|||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue