mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
[3.12] GH-107774: Add missing audit event for PEP 669 (GH-107775) (#107839)
GH-107774: Add missing audit event for PEP 669 (GH-107775)
(cherry picked from commit 494e3d4436
)
Co-authored-by: Mark Shannon <mark@hotpy.org>
This commit is contained in:
parent
ddca26188d
commit
81d3afae1a
4 changed files with 30 additions and 0 deletions
|
@ -1858,6 +1858,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue