[Python-checkins] cpython (3.2): check for NULL
benjamin.peterson
python-checkins at python.org
Thu Mar 22 13:58:03 CET 2012
http://hg.python.org/cpython/rev/1b467efb9b27
changeset: 75870:1b467efb9b27
branch: 3.2
parent: 75868:f57cbcefde34
user: Benjamin Peterson <benjamin at python.org>
date: Thu Mar 22 08:56:15 2012 -0400
summary:
check for NULL
files:
Python/future.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Python/future.c b/Python/future.c
--- a/Python/future.c
+++ b/Python/future.c
@@ -87,7 +87,8 @@
if (s->kind == ImportFrom_kind) {
PyObject *modname = s->v.ImportFrom.module;
- if (!PyUnicode_CompareWithASCIIString(modname, "__future__")) {
+ if (modname &&
+ !PyUnicode_CompareWithASCIIString(modname, "__future__")) {
if (done) {
PyErr_SetString(PyExc_SyntaxError,
ERR_LATE_FUTURE);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list