From 3b57f50efc16c65df96914ec53bc8d3dc28e18b6 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 1 Jun 2019 21:18:48 +0100 Subject: bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707) --- Doc/c-api/code.rst | 2 +- Objects/codeobject.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 92baa4c..4842810 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 bf68e54..2333075 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; } -- cgit v0.12