summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-05 18:23:27 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-05 18:23:27 +0100
commit9a6cf6cff587281c54dc45951ff3f24e1385cc18 (patch)
treea63f10d31f5423d0c7c1c7d6f1081ca0ca012e20 /Objects
parent2354013b116b1866c606ede6879dbc4030909292 (diff)
downloadcpython-9a6cf6cff587281c54dc45951ff3f24e1385cc18.tar.gz
Use directly _PyObject_GenericSetAttrWithDict()
Modify type_setattro() to call directly _PyObject_GenericSetAttrWithDict() instead of PyObject_GenericSetAttr(). PyObject_GenericSetAttr() is a thin wrapper to _PyObject_GenericSetAttrWithDict().
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index d9699ef1ba..f3e718b5e6 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3082,7 +3082,7 @@ type_setattro(PyTypeObject *type, PyObject *name, PyObject *value)
type->tp_name);
return -1;
}
- if (PyObject_GenericSetAttr((PyObject *)type, name, value) < 0)
+ if (_PyObject_GenericSetAttrWithDict((PyObject *)type, name, value, NULL) < 0)
return -1;
return update_slot(type, name);
}