[Python-checkins] r59946 - python/trunk/Modules/_ctypes/_ctypes.c
amaury.forgeotdarc
python-checkins at python.org
Mon Jan 14 02:07:27 CET 2008
Author: amaury.forgeotdarc
Date: Mon Jan 14 02:07:27 2008
New Revision: 59946
Modified:
python/trunk/Modules/_ctypes/_ctypes.c
Log:
?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.
Modified: python/trunk/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/trunk/Modules/_ctypes/_ctypes.c (original)
+++ python/trunk/Modules/_ctypes/_ctypes.c Mon Jan 14 02:07:27 2008
@@ -410,7 +410,7 @@
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) &&
More information about the Python-checkins
mailing list