diff options
author | Thomas Wouters <thomas@python.org> | 2022-11-15 12:38:09 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2022-11-15 12:38:09 (GMT) |
commit | 73943cbc4c5e97f71b76150c549d07e8ed00066b (patch) | |
tree | 748ea6203fa3d36112565a67065e3a1bdc550b40 /Python/sysmodule.c | |
parent | bd58b89654a98cbfb92a6e054ac285bd32cdf58f (diff) | |
parent | f13f466474ed53529acd3f209070431fbae14323 (diff) | |
download | cpython-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.c | 2 |
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) { |