summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-14 00:28:01 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-14 00:28:01 (GMT)
commitbdbb395f2b3dd8de75f0f3cc7754b94a6d89e017 (patch)
tree677fe0c46a20c14874c3887e4e793958ab2a11df /Python
parentf903f00ee211529811001ad0c35764efe68ca039 (diff)
downloadcpython-bdbb395f2b3dd8de75f0f3cc7754b94a6d89e017.zip
cpython-bdbb395f2b3dd8de75f0f3cc7754b94a6d89e017.tar.gz
cpython-bdbb395f2b3dd8de75f0f3cc7754b94a6d89e017.tar.bz2
Looks like an oopsie -- I ignored a warning at my peril.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 0f5fd2d..cbb6b4d 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2972,7 +2972,8 @@ expr_constant(expr_ty e)
return PyObject_IsTrue(e->v.Str.s);
case Name_kind:
/* optimize away names that can't be reassigned */
- id = _PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL);
+ id = PyString_AS_STRING(
+ _PyUnicode_AsDefaultEncodedString(e->v.Name.id, NULL));
if (strcmp(id, "True") == 0) return 1;
if (strcmp(id, "False") == 0) return 0;
if (strcmp(id, "None") == 0) return 0;