summaryrefslogtreecommitdiff
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
commit9083eb6aac6e0aa0eb1dee9bc535538de4125fcd (patch)
treedbf66c843fe393fd2b3dbce12d63219d5cdd565f
parent408bfa6d96456a7c3621e5c6d249d3fac337a78b (diff)
downloadcpython-git-9083eb6aac6e0aa0eb1dee9bc535538de4125fcd.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().
-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);
}