summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-07-27 15:03:38 (GMT)
committerGitHub <noreply@github.com>2022-07-27 15:03:38 (GMT)
commitf40bc7fa49f8d137f9b38f7a14569e9a9bdbed07 (patch)
tree01f24798d6ac958feac40337a0a877ba60a66b5f /Modules/_ctypes
parent2833f3798dc3647e850b303a4d0fa00609a0ae9b (diff)
downloadcpython-f40bc7fa49f8d137f9b38f7a14569e9a9bdbed07.zip
cpython-f40bc7fa49f8d137f9b38f7a14569e9a9bdbed07.tar.gz
cpython-f40bc7fa49f8d137f9b38f7a14569e9a9bdbed07.tar.bz2
gh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack during deallocation in debug mode (#95325)
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/cfield.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index c7234fb..13ed8b7 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -279,6 +279,7 @@ PyCField_clear(CFieldObject *self)
static void
PyCField_dealloc(PyObject *self)
{
+ PyObject_GC_UnTrack(self);
PyCField_clear((CFieldObject *)self);
Py_TYPE(self)->tp_free((PyObject *)self);
}