Skip to content

Commit 3b57f50

Browse files
authored
bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)
1 parent 938d9a0 commit 3b57f50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bound into a function.
4545
The first parameter (*argcount*) now represents the total number of positional arguments,
4646
including positional-only.
4747
48-
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
48+
.. audit-event:: code.__new__ "code filename name argcount posonlyargcount kwonlyargcount nlocals stacksize flags"
4949
5050
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
5151

Objects/codeobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ code_new(PyTypeObject *type, PyObject *args, PyObject *kw)
390390
&PyTuple_Type, &cellvars))
391391
return NULL;
392392

393-
if (PySys_Audit("code.__new__", "OOOiiiii",
394-
code, filename, name, argcount, kwonlyargcount,
395-
nlocals, stacksize, flags) < 0) {
393+
if (PySys_Audit("code.__new__", "OOOiiiiii",
394+
code, filename, name, argcount, posonlyargcount,
395+
kwonlyargcount, nlocals, stacksize, flags) < 0) {
396396
goto cleanup;
397397
}
398398

0 commit comments

Comments
 (0)