diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-08-01 16:18:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-01 16:18:07 (GMT) |
commit | 80b762f010097ab8137782e5fbdc89c5c620ed4e (patch) | |
tree | 153bd836a83680ade86f0fd00b07f8dfcb71a03e /Python/import.c | |
parent | 6c785c0ebdadc84d80a53d896c38fd7ada8ae1f6 (diff) | |
download | cpython-80b762f010097ab8137782e5fbdc89c5c620ed4e.zip cpython-80b762f010097ab8137782e5fbdc89c5c620ed4e.tar.gz cpython-80b762f010097ab8137782e5fbdc89c5c620ed4e.tar.bz2 |
bpo-31650: Remove _Py_CheckHashBasedPycsMode global config var (GH-8608)
bpo-31650, bpo-34170: Replace _Py_CheckHashBasedPycsMode with
_PyCoreConfig._check_hash_pycs_mode. Modify PyInit__imp() and
zipimport to get the parameter from the current interpreter core
configuration.
Remove Include/internal/import.h file.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c index de132a3..71d5ea1 100644 --- a/Python/import.c +++ b/Python/import.c @@ -5,7 +5,6 @@ #include "Python-ast.h" #undef Yield /* undefine macro conflicting with winbase.h */ #include "internal/hash.h" -#include "internal/import.h" #include "internal/pystate.h" #include "errcode.h" #include "marshal.h" @@ -2290,7 +2289,8 @@ PyInit__imp(void) d = PyModule_GetDict(m); if (d == NULL) goto failure; - PyObject *pyc_mode = PyUnicode_FromString(_Py_CheckHashBasedPycsMode); + _PyCoreConfig *config = &PyThreadState_GET()->interp->core_config; + PyObject *pyc_mode = PyUnicode_FromString(config->_check_hash_pycs_mode); if (pyc_mode == NULL) { goto failure; } |