mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
This commit is contained in:
parent
38f44b4a4a
commit
762f93ff2e
37 changed files with 154 additions and 132 deletions
|
|
@ -1019,28 +1019,28 @@ static PyObject *
|
|||
mappingproxy_keys(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(keys);
|
||||
return _PyObject_CallMethodId(pp->mapping, &PyId_keys, NULL);
|
||||
return _PyObject_CallMethodIdNoArgs(pp->mapping, &PyId_keys);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
mappingproxy_values(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(values);
|
||||
return _PyObject_CallMethodId(pp->mapping, &PyId_values, NULL);
|
||||
return _PyObject_CallMethodIdNoArgs(pp->mapping, &PyId_values);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
mappingproxy_items(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(items);
|
||||
return _PyObject_CallMethodId(pp->mapping, &PyId_items, NULL);
|
||||
return _PyObject_CallMethodIdNoArgs(pp->mapping, &PyId_items);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
mappingproxy_copy(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(copy);
|
||||
return _PyObject_CallMethodId(pp->mapping, &PyId_copy, NULL);
|
||||
return _PyObject_CallMethodIdNoArgs(pp->mapping, &PyId_copy);
|
||||
}
|
||||
|
||||
/* WARNING: mappingproxy methods must not give access
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue