mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
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:
parent
408bfa6d96
commit
9083eb6aac
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue