diff options
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r-- | Objects/descrobject.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index a786bae..046eebd 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -703,34 +703,39 @@ static PyObject * proxy_get(proxyobject *pp, PyObject *args) { PyObject *key, *def = Py_None; + _Py_identifier(get); if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &def)) return NULL; - return PyObject_CallMethod(pp->dict, "get", "(OO)", key, def); + return _PyObject_CallMethodId(pp->dict, &PyId_get, "(OO)", key, def); } static PyObject * proxy_keys(proxyobject *pp) { - return PyObject_CallMethod(pp->dict, "keys", NULL); + _Py_identifier(keys); + return _PyObject_CallMethodId(pp->dict, &PyId_keys, NULL); } static PyObject * proxy_values(proxyobject *pp) { - return PyObject_CallMethod(pp->dict, "values", NULL); + _Py_identifier(values); + return _PyObject_CallMethodId(pp->dict, &PyId_values, NULL); } static PyObject * proxy_items(proxyobject *pp) { - return PyObject_CallMethod(pp->dict, "items", NULL); + _Py_identifier(items); + return _PyObject_CallMethodId(pp->dict, &PyId_items, NULL); } static PyObject * proxy_copy(proxyobject *pp) { - return PyObject_CallMethod(pp->dict, "copy", NULL); + _Py_identifier(copy); + return _PyObject_CallMethodId(pp->dict, &PyId_copy, NULL); } static PyMethodDef proxy_methods[] = { |