Fix so that Runtime.PyModuleType is retrieved via Python.dll (#904) (#929)

This commit is contained in:
ftreurni 2019-08-02 12:21:48 +02:00 коммит произвёл Benedikt Reinartz
Родитель 1ce630e5b0
Коммит f20bcf6498
3 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -27,6 +27,7 @@
- David Lassonde ([@lassond](https://github.com/lassond))
- David Lechner ([@dlech](https://github.com/dlech))
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
- Florian Treurniet ([@ftreurni](https://github.com/ftreurni))
- He-chien Tsai ([@t3476](https://github.com/t3476))
- Inna Wiesel ([@inna-w](https://github.com/inna-w))
- Ivan Cronyn ([@cronan](https://github.com/cronan))

Просмотреть файл

@ -19,6 +19,9 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
### Fixed
- Fixed runtime that fails loading when using pythonnet in an environment
together with Nuitka
## [2.4.0][]
### Added
@ -61,7 +64,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])

Просмотреть файл

@ -205,7 +205,6 @@ namespace Python.Runtime
PyNotImplemented = PyObject_GetAttrString(op, "NotImplemented");
PyBaseObjectType = PyObject_GetAttrString(op, "object");
PyModuleType = PyObject_Type(op);
PyNone = PyObject_GetAttrString(op, "None");
PyTrue = PyObject_GetAttrString(op, "True");
PyFalse = PyObject_GetAttrString(op, "False");
@ -302,6 +301,7 @@ namespace Python.Runtime
dllLocal = loader.Load(_PythonDll);
}
_PyObject_NextNotImplemented = loader.GetFunction(dllLocal, "_PyObject_NextNotImplemented");
PyModuleType = loader.GetFunction(dllLocal, "PyModule_Type");
if (dllLocal != IntPtr.Zero)
{