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().
This commit is contained in:
Victor Stinner 2016-12-05 18:23:27 +01:00
parent 408bfa6d96
commit 9083eb6aac

View file

@ -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);
}