Skip to content

Commit ecd7e60

Browse files
committed
Fix runtime Initialize dll nameclash
Looks like dllLocal never changes from IntPtr.Zero
1 parent 2b6f815 commit ecd7e60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/runtime/runtime.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,16 @@ internal static void Initialize()
289289
Error = new IntPtr(-1);
290290

291291
#if PYTHON3
292-
IntPtr dll = IntPtr.Zero;
292+
IntPtr dllLocal = IntPtr.Zero;
293293
if (Runtime.dll != "__Internal")
294294
{
295295
NativeMethods.LoadLibrary(Runtime.dll);
296296
}
297-
_PyObject_NextNotImplemented = NativeMethods.GetProcAddress(dll, "_PyObject_NextNotImplemented");
297+
_PyObject_NextNotImplemented = NativeMethods.GetProcAddress(dllLocal, "_PyObject_NextNotImplemented");
298298
#if !(MONO_LINUX || MONO_OSX)
299-
if (dll != IntPtr.Zero)
299+
if (dllLocal != IntPtr.Zero)
300300
{
301-
NativeMethods.FreeLibrary(dll);
301+
NativeMethods.FreeLibrary(dllLocal);
302302
}
303303
#endif
304304
#endif

0 commit comments

Comments
 (0)