PyRun_StringFlags(): forgot to pass the flags on to

PyParser_SimpleParseString().  Now calls
PyParser_SimpleParseStringFlags() with the correct flag.
This commit is contained in:
Guido van Rossum 2001-07-16 16:51:33 +00:00
parent 1baac7201e
commit a1b3a47406
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}