Skip to content

Commit

Permalink
bpo-36842: Pass positional only parameters to code_new audit hook (py…
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal authored and DinoV committed Jan 14, 2020
1 parent 9db9e99 commit 6af815b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,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;
}

Expand Down

0 comments on commit 6af815b

Please sign in to comment.