File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,10 @@ greenlet_internal_mod_init() noexcept
213213 try {
214214 CreatedModule m (greenlet_module_def);
215215
216+ #ifdef Py_GIL_DISABLED
217+ PyUnstable_Module_SetGIL (m.borrow (), Py_MOD_GIL_NOT_USED);
218+ #endif
219+
216220 Require (PyType_Ready (&PyGreenlet_Type));
217221 Require (PyType_Ready (&PyGreenletUnswitchable_Type));
218222
Original file line number Diff line number Diff line change @@ -221,6 +221,10 @@ PyInit__test_extension_cpp(void)
221221 p_test_exception_throw_nonstd = test_exception_throw_nonstd;
222222 p_test_exception_throw_std = test_exception_throw_std;
223223 p_test_exception_switch_recurse = test_exception_switch_recurse;
224+ #ifdef Py_GIL_DISABLED
225+ PyUnstable_Module_SetGIL (module , Py_MOD_GIL_NOT_USED);
226+ #endif
227+
224228#ifdef Py_GIL_DISABLED
225229 PyUnstable_Module_SetGIL (module , Py_MOD_GIL_NOT_USED);
226230#endif
You can’t perform that action at this time.
0 commit comments