Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
- Moved wheel import in setup.py inside of a try/except to prevent pip collection failures
- Removes PyLong_GetMax and PyClass_New when targetting Python3
- Added support for converting python iterators to C# arrays
- Changed usage of obselete function GetDelegateForFunctionPointer(IntPtr, Type) to GetDelegateForFunctionPointer<TDelegate>(IntPtr)

### Fixed

- Fixed runtime that fails loading when using pythonnet in an environment
together with Nuitka
- Fixes bug where delegates get casts (dotnetcore)

## [2.4.0][]

Expand Down
8 changes: 5 additions & 3 deletions src/runtime/nativecall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@ internal class NativeCall

public static void Void_Call_1(IntPtr fp, IntPtr a1)
{
((Void_1_Delegate)Marshal.GetDelegateForFunctionPointer(fp, typeof(Void_1_Delegate)))(a1);
var d = Marshal.GetDelegateForFunctionPointer<Interop.DestructorFunc>(fp);
d(a1);
}

public static IntPtr Call_3(IntPtr fp, IntPtr a1, IntPtr a2, IntPtr a3)
{
var d = (Interop.TernaryFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(Interop.TernaryFunc));
var d = Marshal.GetDelegateForFunctionPointer<Interop.TernaryFunc>(fp);
return d(a1, a2, a3);
}


public static int Int_Call_3(IntPtr fp, IntPtr a1, IntPtr a2, IntPtr a3)
{
return ((Int_3_Delegate)Marshal.GetDelegateForFunctionPointer(fp, typeof(Int_3_Delegate)))(a1, a2, a3);
var d = Marshal.GetDelegateForFunctionPointer<Interop.ObjObjArgFunc>(fp);
return d(a1, a2, a3);
}
#else
private static AssemblyBuilder aBuilder;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy