Skip to content

Commit

Permalink
Marks module as not using GIL for free-threading
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbueno committed Sep 11, 2024
1 parent 239111a commit 6a82d40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ language = "c"
version = {attr = "extrainterpreters.__version__"}

[project]
name = "python-extracontext"
name = "extrainterpreters"
dynamic = ["version"]
description = "PEP 554 Subinterpreters usable from Python code"
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
6 changes: 5 additions & 1 deletion src/extrainterpreters/memoryboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ _memoryboard_modexec(PyObject *m)
static PyModuleDef_Slot _memoryboard_slots[] = {
{Py_mod_exec, _memoryboard_modexec},
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
#if PY_VERSION_HEX >= 0x030D0000
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
#endif
{0, NULL}
};

Expand Down Expand Up @@ -156,5 +159,6 @@ static struct PyModuleDef _memoryboard = {
PyMODINIT_FUNC
PyInit__memoryboard(void)
{
return PyModuleDef_Init(&_memoryboard);
PyObject *m = PyModuleDef_Init(&_memoryboard);
return m;
}

0 comments on commit 6a82d40

Please sign in to comment.