summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-07-16 16:51:33 +0000
committerGuido van Rossum <guido@python.org>2001-07-16 16:51:33 +0000
commit9f1581a69dc1b5b4e3fd6e3dd3e7b1a7e4585343 (patch)
treeee6145c78d3fc59617d8230b04e3947ba6a947f1 /Python/pythonrun.c
parent032ad71ded2c176deca610feff2fe5049da4f192 (diff)
downloadcpython-9f1581a69dc1b5b4e3fd6e3dd3e7b1a7e4585343.tar.gz
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 1d20deb174..fbc3b16932 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);
}