diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2004-02-02 13:39:01 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2004-02-02 13:39:01 (GMT) |
commit | ff83c2bacc2acd782d20b589a02420df571b89a2 (patch) | |
tree | 7bcb6273b88c7db836ac703b7d6b13ba05632be2 /Python | |
parent | 96c44658b99ef2e25a977bce7f310cd2b442cd24 (diff) | |
download | cpython-ff83c2bacc2acd782d20b589a02420df571b89a2.zip cpython-ff83c2bacc2acd782d20b589a02420df571b89a2.tar.gz cpython-ff83c2bacc2acd782d20b589a02420df571b89a2.tar.bz2 |
Fix input() builtin function to respect compiler flags.
(SF patch 876178, patch by mwh, unittest by perky)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index a17c6d9..7321b74 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -979,6 +979,7 @@ builtin_input(PyObject *self, PyObject *args) char *str; PyObject *res; PyObject *globals, *locals; + PyCompilerFlags cf; line = builtin_raw_input(self, args); if (line == NULL) @@ -994,7 +995,9 @@ builtin_input(PyObject *self, PyObject *args) PyEval_GetBuiltins()) != 0) return NULL; } - res = PyRun_String(str, Py_eval_input, globals, locals); + cf.cf_flags = 0; + PyEval_MergeCompilerFlags(&cf); + res = PyRun_StringFlags(str, Py_eval_input, globals, locals, &cf); Py_DECREF(line); return res; } |