summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-07-16 16:51:33 (GMT)
committerGuido van Rossum <guido@python.org>2001-07-16 16:51:33 (GMT)
commita1b3a4740662c5815c29a694e89de2171406b253 (patch)
treef485689113f14403f3c0632af21c3579fe4ec39d /Python/pythonrun.c
parent1baac7201e99cb83f0a153fb3764c8c8daa9414d (diff)
downloadcpython-a1b3a4740662c5815c29a694e89de2171406b253.zip
cpython-a1b3a4740662c5815c29a694e89de2171406b253.tar.gz
cpython-a1b3a4740662c5815c29a694e89de2171406b253.tar.bz2
PyRun_StringFlags(): forgot to pass the flags on to
PyParser_SimpleParseString(). Now calls PyParser_SimpleParseStringFlags() with the correct flag.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 1d20deb..fbc3b16 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1005,7 +1005,10 @@ PyObject *
PyRun_StringFlags(char *str, int start, PyObject *globals, PyObject *locals,
PyCompilerFlags *flags)
{
- return run_err_node(PyParser_SimpleParseString(str, start),
+ return run_err_node(PyParser_SimpleParseStringFlags(
+ str, start,
+ (flags && flags->cf_flags & PyCF_GENERATORS) ?
+ PyPARSE_YIELD_IS_KEYWORD : 0),
"<string>", globals, locals, flags);
}