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 = {
2968
2968
PyMODINIT_FUNC
2969
2969
PyInit_zlib_ng (void )
2970
2970
{
2971
- PyObject * m , * ver ;
2972
- m = PyModule_Create (& zlibmodule );
2971
+ PyObject * m = PyModule_Create (& zlibmodule );
2973
2972
if (m == NULL ) {
2974
2973
return NULL ;
2975
2974
}
2975
+ #ifdef Py_GIL_DISABLED
2976
+ PyUnstable_Module_SetGIL (m , Py_MOD_GIL_NOT_USED );
2977
+ #endif
2978
+
2976
2979
if (PyType_Ready (& Comptype ) < 0 ) {
2977
2980
return NULL ;
2978
2981
}
@@ -3050,7 +3053,7 @@ PyInit_zlib_ng(void)
3050
3053
PyModule_AddIntMacro (m , Z_FINISH );
3051
3054
PyModule_AddIntMacro (m , Z_BLOCK );
3052
3055
PyModule_AddIntMacro (m , Z_TREES );
3053
- ver = PyUnicode_FromString (ZLIBNG_VERSION );
3056
+ PyObject * ver = PyUnicode_FromString (ZLIBNG_VERSION );
3054
3057
if (ver != NULL )
3055
3058
PyModule_AddObject (m , "ZLIBNG_VERSION" , ver );
3056
3059
You can’t perform that action at this time.
0 commit comments