summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-27 14:11:45 (GMT)
committerGitHub <noreply@github.com>2020-03-27 14:11:45 (GMT)
commit1c1e68cf3e3a2a19a0edca9a105273e11ddddc6e (patch)
tree5ca84d927ab6ffa09308943075d056e604f3667b /Python/import.c
parent33f15a16d40cb8010a8c758952cbf88d7912ee2d (diff)
downloadcpython-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.c9
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;
}