mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)
This commit is contained in:
parent
938d9a0167
commit
3b57f50efc
2 changed files with 4 additions and 4 deletions
|
@ -45,7 +45,7 @@ bound into a function.
|
||||||
The first parameter (*argcount*) now represents the total number of positional arguments,
|
The first parameter (*argcount*) now represents the total number of positional arguments,
|
||||||
including positional-only.
|
including positional-only.
|
||||||
|
|
||||||
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
|
.. audit-event:: code.__new__ "code filename name argcount posonlyargcount kwonlyargcount nlocals stacksize flags"
|
||||||
|
|
||||||
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
|
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
|
||||||
|
|
||||||
|
|
|
@ -390,9 +390,9 @@ code_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
||||||
&PyTuple_Type, &cellvars))
|
&PyTuple_Type, &cellvars))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (PySys_Audit("code.__new__", "OOOiiiii",
|
if (PySys_Audit("code.__new__", "OOOiiiiii",
|
||||||
code, filename, name, argcount, kwonlyargcount,
|
code, filename, name, argcount, posonlyargcount,
|
||||||
nlocals, stacksize, flags) < 0) {
|
kwonlyargcount, nlocals, stacksize, flags) < 0) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue