Skip to content

Commit 628fe81

Browse files
committed
Merge remote-tracking branch '2bndy5/free-thread-able'
2 parents 706e357 + 559f316 commit 628fe81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pygit2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,10 @@ PyInit__pygit2(void)
465465
if (m == NULL)
466466
return NULL;
467467

468+
#ifdef Py_GIL_DISABLED
469+
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
470+
#endif
471+
468472
/* libgit2 version info */
469473
ADD_CONSTANT_INT(m, LIBGIT2_VER_MAJOR)
470474
ADD_CONSTANT_INT(m, LIBGIT2_VER_MINOR)

0 commit comments

Comments
 (0)