8000 Temporary fix method binder for out parameters by eirannejad · Pull Request #1672 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Temporary fix method binder for out parameters #1672

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 7 commits into from
Jan 14, 2022
Merged
Changes from 1 commit
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
Next Next commit
temp fixed method binder for out params
  • Loading branch information
eirannejad committed Jan 13, 2022
commit a13d3c9d99171db6c207d6bb561e230bfebe9e00
6 changes: 6 additions & 0 deletions src/runtime/MethodBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,9 @@ static BorrowedReference HandleParamsArray(BorrowedReference args, int arrayStar
margs[paramIndex] = defaultArgList[paramIndex - pyArgCount];
}

if (parameter.ParameterType.IsByRef)
outs++;

continue;
}

Expand Down Expand Up @@ -817,6 +820,9 @@ static bool MatchesArgumentCount(int positionalArgumentCount, ParameterInfo[] pa
defaultArgList.Add(parameters[v].GetDefaultValue());
defaultsNeeded++;
}
else if (parameters[v].IsOut) {
defaultArgList.Add(null);
}
else if (!paramsArray)
{
match = false;
Expand Down
0