- Notifications
You must be signed in to change notification settings - Fork749
Closed
Description
Environment
- Pythonnet version: master
- Python version: 3.7 (probably any)
- Operating System: mono on any platform, not dotnet on any platform
Details
- Describe what you were trying to get done.
Working on the reload improvements, we find that GetDelegateFromFunctionPointer is sometimes returning weird types that can't be casted to the proper delegate type. This is apparently a known issue in pythonnet on dotnet as well though we haven't hit that problem on that platform:
dotnet/runtime#9074
https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.getdelegateforfunctionpointer?view=net-5.0
"You can use this method only for pure unmanaged function pointers."
We'd need to change users of NativeCall to make sure they are only calling non-managed functions, or else undefined behaviour can happen.
- What commands did you run to trigger this issue? If you can provide a
Unit tests for the reload work that@BadSingleton is working on (#1287)
Metadata
Metadata
Assignees
Labels
No labels