mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Looks like an oopsie -- I ignored a warning at my peril.
This commit is contained in:
parent
f903f00ee2
commit
bdbb395f2b
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue