From: Guido van Rossum Date: Thu, 14 Jun 2007 00:28:01 +0000 (+0000) Subject: Looks like an oopsie -- I ignored a warning at my peril. X-Git-Tag: v3.0a1~761 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdbb395f2b3dd8de75f0f3cc7754b94a6d89e017;p=python Looks like an oopsie -- I ignored a warning at my peril. --- diff --git a/Python/compile.c b/Python/compile.c index 0f5fd2dfde..cbb6b4d61a 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;