mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183)
Add the dependency to tstate more explicit.
This commit is contained in:
parent
33f15a16d4
commit
1c1e68cf3e
4 changed files with 31 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue