]> granicus.if.org Git - python/commitdiff
Looks like an oopsie -- I ignored a warning at my peril.
authorGuido van Rossum <guido@python.org>
Thu, 14 Jun 2007 00:28:01 +0000 (00:28 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 14 Jun 2007 00:28:01 +0000 (00:28 +0000)
Python/compile.c

index 0f5fd2dfde25280e0b5600305d67bef1072a9d2f..cbb6b4d61a486c896e70324db78e812c3bc02dde 100644 (file)
@@ -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;