mirror of
https://github.com/python/cpython.git
synced 2025-10-21 06:02:21 +00:00
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.
This commit is contained in:
parent
6c785c0ebd
commit
80b762f010
6 changed files with 7 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue