diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-27 15:11:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 15:11:45 +0100 |
commit | 1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e (patch) | |
tree | 5ca84d927ab6ffa09308943075d056e604f3667b /Python/errors.c | |
parent | bpo-40077: Convert _json module to use PyType_FromSpec() (GH-19177) (diff) | |
download | cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.tar.gz cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.tar.bz2 cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.zip |
bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183)
Add the dependency to tstate more explicit.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index 4656fb2a336..a2fe52b8120 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; |