summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2022-11-15 12:38:09 (GMT)
committerThomas Wouters <thomas@python.org>2022-11-15 12:38:09 (GMT)
commit73943cbc4c5e97f71b76150c549d07e8ed00066b (patch)
tree748ea6203fa3d36112565a67065e3a1bdc550b40 /Python/sysmodule.c
parentbd58b89654a98cbfb92a6e054ac285bd32cdf58f (diff)
parentf13f466474ed53529acd3f209070431fbae14323 (diff)
downloadcpython-73943cbc4c5e97f71b76150c549d07e8ed00066b.zip
cpython-73943cbc4c5e97f71b76150c549d07e8ed00066b.tar.gz
cpython-73943cbc4c5e97f71b76150c549d07e8ed00066b.tar.bz2
Merge the 3.12.0a2 release into main.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 1090b12..6f0a126 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -431,6 +431,8 @@ sys_addaudithook_impl(PyObject *module, PyObject *hook)
if (interp->audit_hooks == NULL) {
return NULL;
}
+ /* Avoid having our list of hooks show up in the GC module */
+ PyObject_GC_UnTrack(interp->audit_hooks);
}
if (PyList_Append(interp->audit_hooks, hook) < 0) {