Skip to content

Commit b3f09a4

Browse files
committed
Add comments
1 parent d53b678 commit b3f09a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypyc/codegen/emitmodule.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,14 @@ def emit_module_def_slots(self, emitter: Emitter, module_prefix: str) -> None:
887887
emitter.emit_line(f"static PyModuleDef_Slot {name}[] = {{")
888888
emitter.emit_line(f"{{Py_mod_exec, {exec_name}}},")
889889
if sys.version_info >= (3, 12):
890+
# Multiple interpreter support requires not using any C global state,
891+
# which we don't support yet.
890892
emitter.emit_line(
891893
"{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},"
892894
)
893895
if sys.version_info >= (3, 13):
896+
# Declare support for free-threading to enable experimentation,
897+
# even if we don't properly support it.
894898
emitter.emit_line("{Py_mod_gil, Py_MOD_GIL_NOT_USED},")
895899
emitter.emit_line("{0, NULL},")
896900
emitter.emit_line("};")

0 commit comments

Comments
 (0)