summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:23:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-05 17:23:27 (GMT)
commit9083eb6aac6e0aa0eb1dee9bc535538de4125fcd (patch)
treedbf66c843fe393fd2b3dbce12d63219d5cdd565f /Objects
parent408bfa6d96456a7c3621e5c6d249d3fac337a78b (diff)
downloadcpython-9083eb6aac6e0aa0eb1dee9bc535538de4125fcd.zip
cpython-9083eb6aac6e0aa0eb1dee9bc535538de4125fcd.tar.gz
cpython-9083eb6aac6e0aa0eb1dee9bc535538de4125fcd.tar.bz2
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 d9699ef..f3e718b 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);
}