From ff83c2bacc2acd782d20b589a02420df571b89a2 Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Mon, 2 Feb 2004 13:39:01 +0000 Subject: Fix input() builtin function to respect compiler flags. (SF patch 876178, patch by mwh, unittest by perky) --- Python/bltinmodule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index a17c6d9c1f..7321b74c02 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; } -- cgit v1.2.1