gh-122188: Remove _imp.pyc_magic_number (GH-122503)

_imp.pyc_magic_number_token should be enough.
This commit is contained in:
Serhiy Storchaka 2024-08-02 13:12:19 +03:00 committed by GitHub
parent d57f8a9f76
commit 03b88522f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 10 deletions

View file

@ -6,7 +6,7 @@
#include "pycore_import.h" // _PyImport_BootstrapImp()
#include "pycore_initconfig.h" // _PyStatus_OK()
#include "pycore_interp.h" // struct _import_runtime_state
#include "pycore_magic_number.h" // PYC_MAGIC_NUMBER
#include "pycore_magic_number.h" // PYC_MAGIC_NUMBER_TOKEN
#include "pycore_namespace.h" // _PyNamespace_Type
#include "pycore_object.h" // _Py_SetImmortal()
#include "pycore_pyerrors.h" // _PyErr_SetString()
@ -4810,10 +4810,6 @@ imp_module_exec(PyObject *module)
return -1;
}
if (PyModule_AddIntConstant(module, "pyc_magic_number", PYC_MAGIC_NUMBER) < 0) {
return -1;
}
if (PyModule_AddIntConstant(
module, "pyc_magic_number_token", PYC_MAGIC_NUMBER_TOKEN) < 0)
{