summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-06 17:41:07 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-06 17:41:07 (GMT)
commit95701bdf40a00b3eb38aa4270b512ebac12fd87b (patch)
treea622069e24076f26a71dccda0908e7b5f039adc3 /Include
parent4ee41c5839b29226f2fc4893555638953f44c71f (diff)
downloadcpython-95701bdf40a00b3eb38aa4270b512ebac12fd87b.zip
cpython-95701bdf40a00b3eb38aa4270b512ebac12fd87b.tar.gz
cpython-95701bdf40a00b3eb38aa4270b512ebac12fd87b.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/pythonrun.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index ec0565e..c364947 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -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 */