diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-27 14:11:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 14:11:45 (GMT) |
commit | 1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e (patch) | |
tree | 5ca84d927ab6ffa09308943075d056e604f3667b /Python/import.c | |
parent | 33f15a16d40cb8010a8c758952cbf88d7912ee2d (diff) | |
download | cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.zip cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.tar.gz cpython-1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e.tar.bz2 |
bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183)
Add the dependency to tstate more explicit.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c index 645ebdf..5d500df 100644 --- a/Python/import.c +++ b/Python/import.c @@ -10,6 +10,7 @@ #include "pycore_pylifecycle.h" #include "pycore_pymem.h" #include "pycore_pystate.h" +#include "pycore_sysmodule.h" #include "errcode.h" #include "marshal.h" #include "code.h" @@ -1735,10 +1736,10 @@ import_find_and_load(PyThreadState *tstate, PyObject *abs_name) PyObject *sys_path = PySys_GetObject("path"); PyObject *sys_meta_path = PySys_GetObject("meta_path"); PyObject *sys_path_hooks = PySys_GetObject("path_hooks"); - if (PySys_Audit("import", "OOOOO", - abs_name, Py_None, sys_path ? sys_path : Py_None, - sys_meta_path ? sys_meta_path : Py_None, - sys_path_hooks ? sys_path_hooks : Py_None) < 0) { + if (_PySys_Audit(tstate, "import", "OOOOO", + abs_name, Py_None, sys_path ? sys_path : Py_None, + sys_meta_path ? sys_meta_path : Py_None, + sys_path_hooks ? sys_path_hooks : Py_None) < 0) { return NULL; } |