File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2968,11 +2968,14 @@ static struct PyModuleDef zlibmodule = {
29682968PyMODINIT_FUNC
29692969PyInit_zlib_ng (void )
29702970{
2971- PyObject * m , * ver ;
2972- m = PyModule_Create (& zlibmodule );
2971+ PyObject * m = PyModule_Create (& zlibmodule );
29732972 if (m == NULL ) {
29742973 return NULL ;
29752974 }
2975+ #ifdef Py_GIL_DISABLED
2976+ PyUnstable_Module_SetGIL (m , Py_MOD_GIL_NOT_USED );
2977+ #endif
2978+
29762979 if (PyType_Ready (& Comptype ) < 0 ) {
29772980 return NULL ;
29782981 }
@@ -3050,7 +3053,7 @@ PyInit_zlib_ng(void)
30503053 PyModule_AddIntMacro (m , Z_FINISH );
30513054 PyModule_AddIntMacro (m , Z_BLOCK );
30523055 PyModule_AddIntMacro (m , Z_TREES );
3053- ver = PyUnicode_FromString (ZLIBNG_VERSION );
3056+ PyObject * ver = PyUnicode_FromString (ZLIBNG_VERSION );
30543057 if (ver != NULL )
30553058 PyModule_AddObject (m , "ZLIBNG_VERSION" , ver );
30563059
You can’t perform that action at this time.
0 commit comments