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:
Miss Islington (bot) 2019-06-24 09:09:47 -07:00 committed by GitHub
parent 366dac99c0
commit 8763d43a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 165 additions and 18 deletions

View file

@ -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);