Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'remotes/upstream/master' into drop-dlopen
  • Loading branch information
amos402 committed Jul 1, 2019
commit 41ac66569e8c794d7c4b6b2ef0db65cbff24f990
21 changes: 7 additions & 14 deletions src/runtime/runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Python.Runtime
{

/// <summary>
/// Encapsulates the low-level Python C API. Note that it is
/// the responsibility of the caller to have acquired the GIL
Expand Down Expand Up @@ -288,7 +289,13 @@ internal static void Initialize(bool initSigs = false)

Error = new IntPtr(-1);

// Initialize data about the platform we're running on. We need
// this for the type manager and potentially other details. Must
// happen after caching the python types, above.
InitializePlatformData();

IntPtr dllLocal = IntPtr.Zero;
var loader = LibraryLoader.Get(OperatingSystem);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you should delete these lines too, and line 295 as well since you moved it below.


// Since `_PyObject_NextNotImplemented` would set to a heap class
// for tp_iternext which doesn't implement __next__.
Expand All @@ -305,20 +312,6 @@ internal static void Initialize(bool initSigs = false)
// happen after caching the python types, above.
InitializePlatformData();

IntPtr dllLocal = IntPtr.Zero;
var loader = LibraryLoader.Get(OperatingSystem);

if (_PythonDll != "__Internal")
{
dllLocal = loader.Load(_PythonDll);
}
_PyObject_NextNotImplemented = loader.GetFunction(dllLocal, "_PyObject_NextNotImplemented");

if (dllLocal != IntPtr.Zero)
{
loader.Free(dllLocal);
}

// Initialize modules that depend on the runtime class.
AssemblyManager.Initialize();
PyCLRMetaType = MetaType.Initialize();
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.