summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r--Objects/descrobject.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 076e741..ed39891 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -804,7 +804,8 @@ mappingproxy_get(mappingproxyobject *pp, PyObject *args)
if (!PyArg_UnpackTuple(args, "get", 1, 2, &key, &def))
return NULL;
- return _PyObject_CallMethodId(pp->mapping, &PyId_get, "(OO)", key, def);
+ return _PyObject_CallMethodIdObjArgs(pp->mapping, &PyId_get,
+ key, def, NULL);
}
static PyObject *
@@ -1172,7 +1173,7 @@ wrapper_call(wrapperobject *wp, PyObject *args, PyObject *kwds)
return (*wk)(self, args, wp->descr->d_wrapped, kwds);
}
- if (kwds != NULL && (!PyDict_Check(kwds) || PyDict_Size(kwds) != 0)) {
+ if (kwds != NULL && (!PyDict_Check(kwds) || PyDict_GET_SIZE(kwds) != 0)) {
PyErr_Format(PyExc_TypeError,
"wrapper %s doesn't take keyword arguments",
wp->descr->d_base->name);
@@ -1453,7 +1454,7 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del)
doc = pold->prop_doc ? pold->prop_doc : Py_None;
}
- new = PyObject_CallFunction(type, "OOOO", get, set, del, doc);
+ new = PyObject_CallFunctionObjArgs(type, get, set, del, doc, NULL);
Py_DECREF(type);
if (new == NULL)
return NULL;