summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-06-01 21:18:48 +0100
committerGitHub <noreply@github.com>2019-06-01 21:18:48 +0100
commit3b57f50efc16c65df96914ec53bc8d3dc28e18b6 (patch)
tree7aefb8b9546b90571934cc331a9881c19274731e
parent938d9a0167f7fa4ed109484d269902021d274c64 (diff)
downloadcpython-git-3b57f50efc16c65df96914ec53bc8d3dc28e18b6.tar.gz
bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)
-rw-r--r--Doc/c-api/code.rst2
-rw-r--r--Objects/codeobject.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst
index 92baa4c7df..48428109e6 100644
--- a/Doc/c-api/code.rst
+++ b/Doc/c-api/code.rst
@@ -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)
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index bf68e54f42..233307562a 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -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;
}