summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-01-14 01:07:27 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-01-14 01:07:27 (GMT)
commit7cdf5f5c318869a7cfa1deaeefb2a7f07244c62e (patch)
treef2d8fd2b128034f47a80909f43115060ad02aefd /Modules
parente4c270c2a887d251966fae5bfc93dbe2b312ee73 (diff)
downloadcpython-7cdf5f5c318869a7cfa1deaeefb2a7f07244c62e.zip
cpython-7cdf5f5c318869a7cfa1deaeefb2a7f07244c62e.tar.gz
cpython-7cdf5f5c318869a7cfa1deaeefb2a7f07244c62e.tar.bz2
?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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index a9eb032..9d7290f 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) &&