summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-09-12 18:12:09 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-09-12 18:12:09 (GMT)
commit439c25eb9e53fb5b47dd392cccd3a8183e0910eb (patch)
tree4222f7db271ed1146d3e119a617c8ed4179d89ab /Modules
parentdcdc3ef5facabec526dff5f78dc3c0b9161184cb (diff)
downloadcpython-439c25eb9e53fb5b47dd392cccd3a8183e0910eb.zip
cpython-439c25eb9e53fb5b47dd392cccd3a8183e0910eb.tar.gz
cpython-439c25eb9e53fb5b47dd392cccd3a8183e0910eb.tar.bz2
Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
Diffstat (limited to 'Modules')
-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 2b54a85..47dbe05 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -18,6 +18,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);