Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit 92bc145

Browse files
committed
fix compile error when PYTHON_WITHOUT_ENABLE_SHARED is not set pythonnet#977
1 parent 2a83fe5 commit 92bc145

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/runtime/runtime.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,11 +1976,9 @@ internal static void SetNoSiteFlag()
19761976
{
19771977
var loader = LibraryLoader.Get(OperatingSystem);
19781978

1979-
IntPtr dllLocal;
1980-
if (_PythonDll != "__Internal")
1981-
{
1982-
dllLocal = loader.Load(_PythonDll);
1983-
}
1979+
IntPtr dllLocal = _PythonDll != "__Internal"
1980+
? loader.Load(_PythonDll)
1981+
: IntPtr.Zero;
19841982

19851983
try
19861984
{

0 commit comments

Comments
 (0)