summaryrefslogtreecommitdiffstats
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 76121f9..71dfa64 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -163,7 +163,6 @@ static PyObject *
weakref_repr(PyWeakReference *self)
{
PyObject *name, *repr;
- _Py_IDENTIFIER(__name__);
PyObject* obj = PyWeakref_GET_OBJECT(self);
if (obj == Py_None) {
@@ -171,7 +170,7 @@ weakref_repr(PyWeakReference *self)
}
Py_INCREF(obj);
- if (_PyObject_LookupAttrId(obj, &PyId___name__, &name) < 0) {
+ if (_PyObject_LookupAttr(obj, &_Py_ID(__name__), &name) < 0) {
Py_DECREF(obj);
return NULL;
}
@@ -462,10 +461,9 @@ proxy_checkref(PyWeakReference *proxy)
#define WRAP_METHOD(method, special) \
static PyObject * \
method(PyObject *proxy, PyObject *Py_UNUSED(ignored)) { \
- _Py_IDENTIFIER(special); \
UNWRAP(proxy); \
Py_INCREF(proxy); \
- PyObject* res = _PyObject_CallMethodIdNoArgs(proxy, &PyId_##special); \
+ PyObject* res = PyObject_CallMethodNoArgs(proxy, &_Py_ID(special)); \
Py_DECREF(proxy); \
return res; \
}