diff options
Diffstat (limited to 'Objects/unionobject.c')
-rw-r--r-- | Objects/unionobject.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 80c7038..72a0a3f 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -255,10 +255,6 @@ _Py_union_type_or(PyObject* self, PyObject* other) static int union_repr_item(_PyUnicodeWriter *writer, PyObject *p) { - _Py_IDENTIFIER(__module__); - _Py_IDENTIFIER(__qualname__); - _Py_IDENTIFIER(__origin__); - _Py_IDENTIFIER(__args__); PyObject *qualname = NULL; PyObject *module = NULL; PyObject *tmp; @@ -269,13 +265,13 @@ union_repr_item(_PyUnicodeWriter *writer, PyObject *p) return _PyUnicodeWriter_WriteASCIIString(writer, "None", 4); } - if (_PyObject_LookupAttrId(p, &PyId___origin__, &tmp) < 0) { + if (_PyObject_LookupAttr(p, &_Py_ID(__origin__), &tmp) < 0) { goto exit; } if (tmp) { Py_DECREF(tmp); - if (_PyObject_LookupAttrId(p, &PyId___args__, &tmp) < 0) { + if (_PyObject_LookupAttr(p, &_Py_ID(__args__), &tmp) < 0) { goto exit; } if (tmp) { @@ -285,13 +281,13 @@ union_repr_item(_PyUnicodeWriter *writer, PyObject *p) } } - if (_PyObject_LookupAttrId(p, &PyId___qualname__, &qualname) < 0) { + if (_PyObject_LookupAttr(p, &_Py_ID(__qualname__), &qualname) < 0) { goto exit; } if (qualname == NULL) { goto use_repr; } - if (_PyObject_LookupAttrId(p, &PyId___module__, &module) < 0) { + if (_PyObject_LookupAttr(p, &_Py_ID(__module__), &module) < 0) { goto exit; } if (module == NULL || module == Py_None) { |