mirror of https://github.com/python/cpython
?Why did my tests not notice this before?
Slots inheritance is very different from OO inheritance. This code lead to infinite recursion on classes derived from StructType.
This commit is contained in:
parent
e4c270c2a8
commit
7cdf5f5c31
|
@ -410,7 +410,7 @@ static int
|
|||
StructType_setattro(PyObject *self, PyObject *key, PyObject *value)
|
||||
{
|
||||
/* XXX Should we disallow deleting _fields_? */
|
||||
if (-1 == Py_TYPE(self)->tp_base->tp_setattro(self, key, value))
|
||||
if (-1 == PyType_Type.tp_setattro(self, key, value))
|
||||
return -1;
|
||||
|
||||
if (value && PyString_Check(key) &&
|
||||
|
|
Loading…
Reference in New Issue