mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-104108: Add the Py_mod_multiple_interpreters Module Def Slot (gh-104148)
I'll be adding a value to indicate support for per-interpreter GIL in gh-99114.
This commit is contained in:
parent
55671fe047
commit
1c420e138f
5 changed files with 122 additions and 22 deletions
|
|
@ -884,3 +884,22 @@ PyInit__test_module_state_shared(void)
|
|||
}
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
/* multiple interpreters supports */
|
||||
|
||||
static PyModuleDef_Slot non_isolated_slots[] = {
|
||||
{Py_mod_exec, execfunc},
|
||||
{Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
static PyModuleDef non_isolated_def = TEST_MODULE_DEF("_test_non_isolated",
|
||||
non_isolated_slots,
|
||||
testexport_methods);
|
||||
|
||||
PyMODINIT_FUNC
|
||||
PyInit__test_non_isolated(void)
|
||||
{
|
||||
return PyModuleDef_Init(&non_isolated_def);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue