Skip to content

Commit 55630f9

Browse files
committed
Fix Windows build
1 parent a8286a6 commit 55630f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/c/jni/org_jpy_PyLib.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ static int python_traceback_report(PyObject *tb, char **buf, int* bufLen);
5858
#define JPy_GIL_AWARE
5959

6060
#ifdef JPy_GIL_AWARE
61+
#if defined(_WIN64)
62+
#define JPy_BEGIN_GIL_STATE { PyGILState_STATE gilState = PyGILState_Ensure();
63+
#else
6164
#define JPy_BEGIN_GIL_STATE { if (Py_IsFinalizing() != 0) pthread_exit(NULL); PyGILState_STATE gilState = PyGILState_Ensure();
62-
// #define JPy_BEGIN_GIL_STATE { PyGILState_STATE gilState = PyGILState_Ensure();
65+
#endif
6366
#define JPy_END_GIL_STATE PyGILState_Release(gilState); }
6467
#else
6568
#define JPy_BEGIN_GIL_STATE

0 commit comments

Comments
 (0)