Skip to content

Commit ab909ba

Browse files
committed
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().
1 parent 979382e commit ab909ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3082,7 +3082,7 @@ type_setattro(PyTypeObject *type, PyObject *name, PyObject *value)
30823082
type->tp_name);
30833083
return -1;
30843084
}
3085-
if (PyObject_GenericSetAttr((PyObject *)type, name, value) < 0)
3085+
if (_PyObject_GenericSetAttrWithDict((PyObject *)type, name, value, NULL) < 0)
30863086
return -1;
30873087
return update_slot(type, name);
30883088
}

0 commit comments

Comments
 (0)