Skip to content

Commit

Permalink
bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809)
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Nov 27, 2021
1 parent 7edb627 commit db55f3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Reverts a change to the ``code.__new__`` :ref:`audit event <audit-events>`
from an earlier prerelease.
8 changes: 4 additions & 4 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,8 +1254,8 @@ code_new_impl(PyTypeObject *type, int argcount, int posonlyargcount,
PyObject *ourfreevars = NULL;
PyObject *ourcellvars = NULL;

if (PySys_Audit("code.__new__", "OOOOiiiiii",
code, filename, name, qualname, argcount, posonlyargcount,
if (PySys_Audit("code.__new__", "OOOiiiiii",
code, filename, name, argcount, posonlyargcount,
kwonlyargcount, nlocals, stacksize, flags) < 0) {
goto cleanup;
}
Expand Down Expand Up @@ -1638,8 +1638,8 @@ code_replace_impl(PyCodeObject *self, int co_argcount,

#undef CHECK_INT_ARG

if (PySys_Audit("code.__new__", "OOOOiiiiii",
co_code, co_filename, co_name, co_qualname, co_argcount,
if (PySys_Audit("code.__new__", "OOOiiiiii",
co_code, co_filename, co_name, co_argcount,
co_posonlyargcount, co_kwonlyargcount, co_nlocals,
co_stacksize, co_flags) < 0) {
return NULL;
Expand Down

0 comments on commit db55f3f

Please sign in to comment.