10000 [Out] parameters no longer added to return tuple by lostmsu · Pull Request #1308 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

[Out] parameters no longer added to return tuple #1308

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2020
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
details about the cause of the failure
- `clr.AddReference` no longer adds ".dll" implicitly
- `PyIter(PyObject)` constructor replaced with static `PyIter.GetIter(PyObject)` method
- Return values from .NET methods that return an interface are now automatically
- BREAKING: Return values from .NET methods that return an interface are now automatically
wrapped in that interface. This is a breaking change for users that rely on being
able to access members that are part of the implementation class, but not the
interface. Use the new __implementation__ or __raw_implementation__ properties to
if you need to "downcast" to the implementation class.
- BREAKING: Parameters marked with `ParameterAttributes.Out` are no longer returned in addition
to the regular method return value (unless they are passed with `ref` or `out` keyword).

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/methodbinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static object[] TryConvertArguments(ParameterInfo[] pi, bool paramsArray,
Runtime.XDecref(op);
}

if (parameter.IsOut || isOut)
if (isOut)
{
outs++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ def test_we_can_bind_to_encoding_get_string():
read = 1

while read > 0:
read, _ = stream.Read(buff, 0, buff.Length)
read = stream.Read(buff, 0, buff.Length)
temp = Encoding.UTF8.GetString(buff, 0, read)
data.append(temp)

Expand Down
0