From 7cdf5f5c318869a7cfa1deaeefb2a7f07244c62e Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Mon, 14 Jan 2008 01:07:27 +0000 Subject: [PATCH] ?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. --- Modules/_ctypes/_ctypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index a9eb032b01..9d7290f8e3 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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) && -- 2.50.1