mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
bpo-36842: Implement PEP 578 (GH-12613)
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
This commit is contained in:
parent
e788057a91
commit
b82e17e626
70 changed files with 3565 additions and 1816 deletions
|
@ -380,6 +380,12 @@ code_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
|||
&PyTuple_Type, &cellvars))
|
||||
return NULL;
|
||||
|
||||
if (PySys_Audit("code.__new__", "OOOiiiii",
|
||||
code, filename, name, argcount, kwonlyargcount,
|
||||
nlocals, stacksize, flags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (argcount < 0) {
|
||||
PyErr_SetString(
|
||||
PyExc_ValueError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue