mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
bpo-37363: Add audit events for a range of modules (GH-14301)
(cherry picked from commit 60419a7e96
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
366dac99c0
commit
8763d43a95
37 changed files with 165 additions and 18 deletions
|
@ -482,6 +482,11 @@ builtin_breakpoint(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb
|
|||
PyErr_SetString(PyExc_RuntimeError, "lost sys.breakpointhook");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (PySys_Audit("builtins.breakpoint", "O", hook) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_INCREF(hook);
|
||||
PyObject *retval = _PyObject_Vectorcall(hook, args, nargs, keywords);
|
||||
Py_DECREF(hook);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue