return views from dict proxy items/values/keys #10630

This commit is contained in:
Benjamin Peterson 2010-12-07 03:46:27 +00:00
parent b5d793309e
commit 0eb7f86320
2 changed files with 14 additions and 8 deletions

View file

@ -710,19 +710,19 @@ proxy_get(proxyobject *pp, PyObject *args)
static PyObject *
proxy_keys(proxyobject *pp)
{
return PyMapping_Keys(pp->dict);
return PyObject_CallMethod(pp->dict, "keys", NULL);
}
static PyObject *
proxy_values(proxyobject *pp)
{
return PyMapping_Values(pp->dict);
return PyObject_CallMethod(pp->dict, "values", NULL);
}
static PyObject *
proxy_items(proxyobject *pp)
{
return PyMapping_Items(pp->dict);
return PyObject_CallMethod(pp->dict, "items", NULL);
}
static PyObject *