Repository navigation
Support for byref parameters when overriding .NET methods from Python - #1663
Merged
lostmsu merged 1 commit into
pythonnet:master from
losttech:bugs/PythonOutInterfaceImpl
Jan 7, 2022
Merged
Conversation
Copy link
Copy Markdown
Member
What does this implement/fix? Explain your changes.
This supports overriding virtual .NET methods that have out or ref parameters from Python.
The new code is emitted to
- unpack the tuple returned from Python to extract new values for byref parameters and modify args array correspondingly
- marshal those new values from the args array back into arguments in generated IL
Does this close any currently open issues?
fixes #1481
Additional notes
Related to #1364
Checklist
Check all those that are applicable and complete.
- Make sure to include one or more tests for your change
- If an enhancement PR, please create docs and at best an example
- Add yourself to
AUTHORS
- Updated the
CHANGELOG
lostmsu
force-pushed
the
bugs/PythonOutInterfaceImpl
branch
from
893f0c9 to
c3ace5b
Compare
January 6, 2022 23:45
lostmsu
mentioned this pull request
Jan 6, 2022
Calling overridden method with out parameter from C# to python results in 0xC0000005 (Access Violation)
#1481
Closed
added support for byref parameters when overriding .NET methods from ...
decc95f
...Python
new code is emitted to
1. unpack the tuple returned from Python to extract new values for byref parameters and modify args array correspondingly
2. marshal those new values from the args array back into arguments in IL
fixes pythonnet#1481
lostmsu
force-pushed
the
bugs/PythonOutInterfaceImpl
branch
from
c3ace5b to
decc95f
Compare
January 6, 2022 23:47
filmor
approved these changes
Jan 7, 2022
View reviewed changes
lostmsu
merged commit
7450c5c
into
pythonnet : master
Jan 7, 2022
lostmsu
deleted the
bugs/PythonOutInterfaceImpl
branch
January 8, 2022 15:49
filmor
mentioned this pull request
Nov 2, 2022
Passing Python objects implementing a generic C# interface to a C# method fails in 3.0.0
#1982
Closed
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
2 participants