Merge 3.2: Issue #12483: ctypes: Fix a crash when the destruction of a callback

object triggers the garbage collector.
This commit is contained in:
Amaury Forgeot d'Arc 2011-09-12 21:09:12 +02:00
commit 65604b51e0
3 changed files with 12 additions and 0 deletions

View file

@ -13,6 +13,7 @@ static void
CThunkObject_dealloc(PyObject *_self)
{
CThunkObject *self = (CThunkObject *)_self;
PyObject_GC_UnTrack(self);
Py_XDECREF(self->converters);
Py_XDECREF(self->callable);
Py_XDECREF(self->restype);