Commit 1c72533a authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

?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.
parent 50af675b
......@@ -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) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment