@@ -376,6 +376,37 @@ The available slot types are:
376376 If multiple ``Py_mod_exec`` slots are specified, they are processed in the
377377 order they appear in the *m_slots* array.
378378
379+ .. c:macro:: Py_mod_multiple_interpreters
380+
381+ Specifies one of the following values:
382+
383+ .. c:macro:: Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED
384+
385+ The module does not support being imported in subinterpreters.
386+
387+ .. c:macro:: Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED
388+
389+ The module supports being imported in subinterpreters,
390+ but only when they share the main interpreter's GIL.
391+ (See :ref: `isolating-extensions-howto `.)
392+
393+ .. c:macro:: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
394+
395+ The module supports being imported in subinterpreters,
396+ even when they have their own GIL.
397+ (See :ref: `isolating-extensions-howto `.)
398+
399+ This slot determines whether or not importing this module
400+ in a subinterpreter will fail.
401+
402+ Multiple ``Py_mod_multiple_interpreters`` slots may not be specified
403+ in one module definition.
404+
405+ If ``Py_mod_multiple_interpreters`` is not specified, the import
406+ machinery defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``.
407+
408+ .. versionadded:: 3.12
409+
379410See :PEP:`489` for more details on multi-phase initialization.
380411
381412Low-level module creation functions
0 commit comments