diff options
Diffstat (limited to 'Objects/bytearrayobject.c')
| -rw-r--r-- | Objects/bytearrayobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 72e581552a..cd350376dd 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -2699,13 +2699,15 @@ static PyObject * bytearray_reduce(PyByteArrayObject *self) { PyObject *latin1, *dict; + _Py_identifier(__dict__); + if (self->ob_bytes) latin1 = PyUnicode_DecodeLatin1(self->ob_bytes, Py_SIZE(self), NULL); else latin1 = PyUnicode_FromString(""); - dict = PyObject_GetAttrString((PyObject *)self, "__dict__"); + dict = _PyObject_GetAttrId((PyObject *)self, &PyId___dict__); if (dict == NULL) { PyErr_Clear(); dict = Py_None; |
