Skip to content

Commit

Permalink
pythongh-117142: Support Importing ctypes in Isolated Interpreters (p…
Browse files Browse the repository at this point in the history
…ythongh-119991)

This makes the support official.

(cherry picked from commit dba7a16)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
  • Loading branch information
2 people authored and miss-islington committed Jun 3, 2024
1 parent ae70531 commit 2ce8e0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The :mod:`ctypes` module may now be imported in all subinterpreters, including
those that have their own GIL.
2 changes: 1 addition & 1 deletion Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5939,7 +5939,7 @@ module_free(void *module)

static PyModuleDef_Slot module_slots[] = {
{Py_mod_exec, _ctypes_mod_exec},
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED},
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
{0, NULL}
};
Expand Down

0 comments on commit 2ce8e0e

Please sign in to comment.