diff options
author | Georg Brandl <georg@python.org> | 2012-04-11 12:46:24 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-04-11 12:46:24 +0200 |
commit | d113fbbdccda87a19675e624650dd02435bf7988 (patch) | |
tree | c3f0f368c5f2bfd5d750c0bb082c0b9744b70894 /Python/future.c | |
parent | b2c574caec7279f6078b9ffecef84f4ed3370725 (diff) | |
parent | 25f9ec117a47548f90748ee892b2d5c5eb9e5c79 (diff) | |
download | cpython-d113fbbdccda87a19675e624650dd02435bf7988.tar.gz |
Merge 3.2.3 release clone.
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Python/future.c b/Python/future.c index d6b653f315..d24ae416ff 100644 --- a/Python/future.c +++ b/Python/future.c @@ -60,13 +60,6 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename) { int i, found_docstring = 0, done = 0, prev_line = 0; - static PyObject *future; - if (!future) { - future = PyUnicode_InternFromString("__future__"); - if (!future) - return 0; - } - if (!(mod->kind == Module_kind || mod->kind == Interactive_kind)) return 1; @@ -93,7 +86,9 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename) */ if (s->kind == ImportFrom_kind) { - if (s->v.ImportFrom.module == future) { + identifier modname = s->v.ImportFrom.module; + if (modname && + !PyUnicode_CompareWithASCIIString(modname, "__future__")) { if (done) { PyErr_SetString(PyExc_SyntaxError, ERR_LATE_FUTURE); |