Skip to content

Commit 851d08d

Browse files
committed
Solve issues in py loader windows.
1 parent 3f1cb6d commit 851d08d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

source/loaders/py_loader/source/py_loader_impl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,6 +2678,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi
26782678
/* Initialize symbol fallback */
26792679
if (py_loader_symbol_fallback_initialize(loader_impl_dependency(impl, "python")) != 0)
26802680
{
2681+
log_write("metacall", LOG_LEVEL_ERROR, "Failed to initialize the Python Loader Symbol Fallback mechanism");
26812682
goto error_init_py;
26822683
}
26832684

source/loaders/py_loader/source/py_loader_threading.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ void py_loader_thread_initialize(const int host)
6969

7070
if (host == 1)
7171
{
72+
PyGILState_STATE gstate = PyGILState_Ensure();
7273
main_thread_state = PyThreadState_Get();
7374
main_thread_ref_count++;
75+
PyGILState_Release(gstate);
7476
}
7577
}
7678

0 commit comments

Comments
 (0)