summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-22 18:24:49 (GMT)
committerGitHub <noreply@github.com>2019-11-22 18:24:49 (GMT)
commit2582d46fbcf7bdf86b9cf4016850b8d155267ac6 (patch)
tree7ac19636e1def16e85485e159ec98a127abb12e2 /Python/import.c
parent82c83bd907409c287a5bd0d0f4598f2c0538f34d (diff)
downloadcpython-2582d46fbcf7bdf86b9cf4016850b8d155267ac6.zip
cpython-2582d46fbcf7bdf86b9cf4016850b8d155267ac6.tar.gz
cpython-2582d46fbcf7bdf86b9cf4016850b8d155267ac6.tar.bz2
bpo-38858: new_interpreter() reuses pycore_init_builtins() (GH-17351)
new_interpreter() now calls _PyBuiltin_Init() to create the builtins module and calls _PyImport_FixupBuiltin(), rather than using _PyImport_FindBuiltin(tstate, "builtins"). pycore_init_builtins() is now responsible to initialize intepr->builtins_copy: inline _PyImport_Init() and remove this function.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/Python/import.c b/Python/import.c
index 923c6d0..045b6d0 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -49,17 +49,6 @@ module _imp
/* Initialize things */
PyStatus
-_PyImport_Init(PyThreadState *tstate)
-{
- PyInterpreterState *interp = tstate->interp;
- interp->builtins_copy = PyDict_Copy(interp->builtins);
- if (interp->builtins_copy == NULL) {
- return _PyStatus_ERR("Can't backup builtins dict");
- }
- return _PyStatus_OK();
-}
-
-PyStatus
_PyImportHooks_Init(PyThreadState *tstate)
{
PyObject *v, *path_hooks = NULL;