Commit 3b57f50e authored by Pablo Galindo's avatar Pablo Galindo Committed by GitHub

bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)

parent 938d9a01
......@@ -45,7 +45,7 @@ bound into a function.
The first parameter (*argcount*) now represents the total number of positional arguments,
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)
......
......@@ -390,9 +390,9 @@ 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) {
if (PySys_Audit("code.__new__", "OOOiiiiii",
code, filename, name, argcount, posonlyargcount,
kwonlyargcount, nlocals, stacksize, flags) < 0) {
goto cleanup;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment