Skip to content

Commit 2d2165c

Browse files
committed
apply petr's comment
1 parent 4ffadb4 commit 2d2165c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/import.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ _PyImport_FixupExtensionObject(PyObject *mod, PyObject *name,
442442
}
443443

444444
// bpo-44050: Extensions and def->m_base.m_copy can be updated
445-
// when extension module created from PyModule_Create().
446-
if (_Py_IsMainInterpreter(tstate->interp) || def->m_slots == NULL) {
445+
// when the extension module doesn't support sub-interpreters.
446+
if (_Py_IsMainInterpreter(tstate->interp) || def->m_size == -1) {
447447
if (def->m_size == -1) {
448448
if (def->m_base.m_copy) {
449449
/* Somebody already imported the module,

0 commit comments

Comments
 (0)