Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-36842: Pass positional only parameters to code_new audit hook #13707

Merged
merged 1 commit into from
Jun 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bound into a function.
.. versionchanged:: 3.8
An extra parameter is required (*posonlyargcount*) to support :PEP:`570`.
.. 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 @@ -391,9 +391,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