summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-09-12 19:09:12 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-09-12 19:09:12 (GMT)
commit65604b51e0da56e244a2266482687959d310b08d (patch)
tree42151d2da7b1baeb4357e963759ca7d62664ed25 /Modules/_ctypes
parentaa2b442bdccf68c191a0023084b1160804fb5e4c (diff)
parentbbe46d63ee9b624c011b4fe50978e2e7fa7cf82e (diff)
downloadcpython-65604b51e0da56e244a2266482687959d310b08d.zip
cpython-65604b51e0da56e244a2266482687959d310b08d.tar.gz
cpython-65604b51e0da56e244a2266482687959d310b08d.tar.bz2
Merge 3.2: Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/callbacks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index d23509f..34c46ad 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -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);