Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b09ba6

Browse files
authored
Parameters marked withParameterAttributes.Out are no longer returned in addition to the regular method return value (unless they are passed withref orout keyword). (#1308)
1 parent57f4a80 commit5b09ba6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

‎CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1818
details about the cause of the failure
1919
-`clr.AddReference` no longer adds ".dll" implicitly
2020
-`PyIter(PyObject)` constructor replaced with static`PyIter.GetIter(PyObject)` method
21-
- Return values from .NET methods that return an interface are now automatically
21+
-BREAKING: Return values from .NET methods that return an interface are now automatically
2222
wrapped in that interface. This is a breaking change for users that rely on being
2323
able to access members that are part of the implementation class, but not the
2424
interface. Use the new__implementation__ or__raw_implementation__ properties to
2525
if you need to "downcast" to the implementation class.
26+
- BREAKING: Parameters marked with`ParameterAttributes.Out` are no longer returned in addition
27+
to the regular method return value (unless they are passed with`ref` or`out` keyword).
2628

2729
###Fixed
2830

‎src/runtime/methodbinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static object[] TryConvertArguments(ParameterInfo[] pi, bool paramsArray,
534534
Runtime.XDecref(op);
535535
}
536536

537-
if(parameter.IsOut||isOut)
537+
if(isOut)
538538
{
539539
outs++;
540540
}

‎src/tests/test_method.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def test_we_can_bind_to_encoding_get_string():
761761
read=1
762762

763763
whileread>0:
764-
read,_=stream.Read(buff,0,buff.Length)
764+
read=stream.Read(buff,0,buff.Length)
765765
temp=Encoding.UTF8.GetString(buff,0,read)
766766
data.append(temp)
767767

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp