Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Drop LoadLibrary#880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
amos402 wants to merge14 commits intopythonnet:masterfromamos402:drop-dlopen
Closed
Show file tree
Hide file tree
Changes from6 commits
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
d1928dc
Drop LoadLibrary dependency
amos402Jun 13, 2019
f000e08
Explain for getting _PyObject_NextNotImplemented
amos402Jun 13, 2019
f882400
Update changelog and authors
amos402Jun 13, 2019
b7715ee
Merge branch 'master' into drop-dlopen
filmorJun 20, 2019
41ac665
Merge remote-tracking branch 'remotes/upstream/master' into drop-dlopen
amos402Jul 1, 2019
c6dae9e
Merge branch 'master' into drop-dlopen
amos402Jul 5, 2019
653a263
Merge branch 'master' into drop-dlopen
amos402Dec 1, 2019
b3e889b
* Load PyModuleType without LibraryLoader
amos402Dec 1, 2019
04d6dfb
Merge remote-tracking branch 'remotes/upstream/master' into drop-dlop…
amos402Dec 14, 2019
5150e61
Prevent exception override
amos402Dec 14, 2019
65e209e
Rollback symbol loading for __Internal
amos402Dec 15, 2019
431d644
Merge branch 'master' into drop-dlopen
amos402Feb 12, 2020
2b84394
* Fix refcnt error
amos402Feb 12, 2020
b7797d3
Merge 'master' into drop-dlopen
amos402Feb 13, 2020
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
1 change: 1 addition & 0 deletionsAUTHORS.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,6 +53,7 @@
- William Sardar ([@williamsardar])(https://github.com/williamsardar)
- Xavier Dupré ([@sdpython](https://github.com/sdpython))
- Zane Purvis ([@zanedp](https://github.com/zanedp))
- ([@amos402]https://github.com/amos402)
- ([@bltribble](https://github.com/bltribble))
- ([@civilx64](https://github.com/civilx64))
- ([@GSPP](https://github.com/GSPP))
Expand Down
3 changes: 2 additions & 1 deletionCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,6 +45,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
- PythonEngine.Intialize will now call `Py_InitializeEx` with a default value of 0, so signals will not be configured by default on embedding. This is different from the previous behaviour, where `Py_Initialize` was called instead, which sets initSigs to 1. ([#449][i449])
- Refactored MethodBinder.Bind in preparation to make it extensible (#829)
- Look for installed Windows 10 sdk's during installation instead of relying on specific versions.
- Remove `LoadLibrary` call. ([#880][p880])

### Fixed

Expand All@@ -60,7 +61,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
- Fixed conversion of 'float' and 'double' values ([#486][i486])
- Fixed 'clrmethod' for python 2 ([#492][i492])
- Fixed double calling of constructor when deriving from .NET class ([#495][i495])
- Fixed `clr.GetClrType` when iterating over `System` members ([#607][p607])
- Fixed `clr.GetClrType` when iterating over `System` members ([#607][p607])
- Fixed `LockRecursionException` when loading assemblies ([#627][i627])
- Fixed errors breaking .NET Remoting on method invoke ([#276][i276])
- Fixed PyObject.GetHashCode ([#676][i676])
Expand Down
22 changes: 13 additions & 9 deletionssrc/runtime/runtime.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -297,16 +297,20 @@ internal static void Initialize(bool initSigs = false)
IntPtr dllLocal = IntPtr.Zero;
var loader = LibraryLoader.Get(OperatingSystem);
Copy link
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.


if (_PythonDll != "__Internal")
{
dllLocal = loader.Load(_PythonDll);
}
_PyObject_NextNotImplemented = loader.GetFunction(dllLocal, "_PyObject_NextNotImplemented");
// Since `_PyObject_NextNotImplemented` would set to a heap class
// for tp_iternext which doesn't implement __next__.
// Thus we need a heap class to get it, the ZipImportError is a
// heap class and it's in builtins, so we can use it as a trick.
var zipimport = PyImport_ImportModule("zipimport");
var ZipImportError = PyObject_GetAttrString(zipimport, "ZipImportError");
_PyObject_NextNotImplemented = Marshal.ReadIntPtr(ZipImportError, TypeOffset.tp_iternext);
XDecref(ZipImportError);
XDecref(zipimport);

if (dllLocal != IntPtr.Zero)
{
loader.Free(dllLocal);
}
// 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();

// Initialize modules that depend on the runtime class.
AssemblyManager.Initialize();
Expand Down

[8]ページ先頭

©2009-2026 Movatter.jp