summaryrefslogtreecommitdiffstats
path: root/Python/instrumentation.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-08-10 11:29:06 (GMT)
committerGitHub <noreply@github.com>2023-08-10 11:29:06 (GMT)
commit494e3d4436774a5ac1a569a635b8c5c881ef1c0c (patch)
tree46132b852f0f16f15e41c58755dc6bcc7c89e011 /Python/instrumentation.c
parent39ef93edb9802dccdb6555d4209ac2e60875a011 (diff)
downloadcpython-494e3d4436774a5ac1a569a635b8c5c881ef1c0c.zip
cpython-494e3d4436774a5ac1a569a635b8c5c881ef1c0c.tar.gz
cpython-494e3d4436774a5ac1a569a635b8c5c881ef1c0c.tar.bz2
GH-107774: Add missing audit event for PEP 669 (GH-107775)
Diffstat (limited to 'Python/instrumentation.c')
-rw-r--r--Python/instrumentation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index 65ea790..64684ad 100644
--- a/Python/instrumentation.c
+++ b/Python/instrumentation.c
@@ -1851,6 +1851,9 @@ monitoring_register_callback_impl(PyObject *module, int tool_id, int event,
PyErr_Format(PyExc_ValueError, "invalid event %d", event);
return NULL;
}
+ if (PySys_Audit("sys.monitoring.register_callback", "O", func) < 0) {
+ return NULL;
+ }
if (func == Py_None) {
func = NULL;
}