?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:
Amaury Forgeot d'Arc 2008-01-14 01:07:27 +00:00
parent e4c270c2a8
commit 7cdf5f5c31
1 changed files with 1 additions and 1 deletions

View File

@ -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) &&