From 1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 27 Mar 2020 15:11:45 +0100 Subject: bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183) Add the dependency to tstate more explicit. --- Python/errors.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index 4656fb2a33..a2fe52b812 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -5,6 +5,7 @@ #include "pycore_initconfig.h" #include "pycore_pyerrors.h" #include "pycore_pystate.h" +#include "pycore_sysmodule.h" #include "pycore_traceback.h" #ifndef __STDC__ @@ -1410,7 +1411,7 @@ _PyErr_WriteUnraisableMsg(const char *err_msg_str, PyObject *obj) goto default_hook; } - if (PySys_Audit("sys.unraisablehook", "OO", hook, hook_args) < 0) { + if (_PySys_Audit(tstate, "sys.unraisablehook", "OO", hook, hook_args) < 0) { Py_DECREF(hook_args); err_msg_str = "Exception ignored in audit hook"; obj = NULL; -- cgit v1.2.1