diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-05-05 20:04:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 20:04:55 (GMT) |
commit | 1c420e138fd828895b6bd3c44ef99156e8796095 (patch) | |
tree | fa6b714a49de1ee679c2de50eeb13735a8c69b1a /Modules | |
parent | 55671fe04700ccb4e73c8db3dd1e9c031dafe700 (diff) | |
download | cpython-1c420e138fd828895b6bd3c44ef99156e8796095.zip cpython-1c420e138fd828895b6bd3c44ef99156e8796095.tar.gz cpython-1c420e138fd828895b6bd3c44ef99156e8796095.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testmultiphase.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c index cf8990a..bc7d8b6 100644 --- a/Modules/_testmultiphase.c +++ b/Modules/_testmultiphase.c @@ -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); +} |