mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
?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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue