Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix a comment.
  • Loading branch information
ericsnowcurrently committed Mar 15, 2023
commit d91bd096532a6e6a4d8c4c7ad71806429ef5f2d0
2 changes: 1 addition & 1 deletion Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ fix_up_extension(PyObject *mod, PyObject *name, PyObject *filename)

// bpo-44050: Extensions and def->m_base.m_copy can be updated
// when the extension module doesn't support sub-interpreters.
// XXX Why special-case the main interpreter?
if (def->m_size == -1) {
if (!is_core_module(tstate->interp, name, filename)) {
if (def->m_base.m_copy) {
Expand All @@ -1044,6 +1043,7 @@ fix_up_extension(PyObject *mod, PyObject *name, PyObject *filename)
}
}

// XXX Why special-case the main interpreter?
if (_Py_IsMainInterpreter(tstate->interp) || def->m_size == -1) {
if (_extensions_cache_set(filename, name, def) < 0) {
return -1;
Expand Down