8000 Add GetPrecedence reference · pythonnet/pythonnet@6afc9e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6afc9e6

Browse files
committed
Add GetPrecedence reference
1 parent 49c85b4 commit 6afc9e6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/runtime/methodbinder.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,12 @@ internal MethodBase[] GetMethods()
167167
}
168168

169169
/// <summary>
170-
/// Precedence algorithm largely lifted from jython - the concerns are
171-
/// generally the same so we'll start w/this and tweak as necessary.
170+
/// Precedence algorithm largely lifted from Jython - the concerns are
171+
/// generally the same so we'll start with this and tweak as necessary.
172172
/// </summary>
173173
/// <remarks>
174-
/// TODO: Add link to specific Jython Section/Code/File
174+
/// Based from Jython `org.python.core.ReflectedArgs.precedence`
175+
/// See: https://github.com/jythontools/jython/blob/master/src/org/python/core/ReflectedArgs.java#L192
175176
/// </remarks>
176177
internal static int GetPrecedence(MethodBase mi)
177178
{
@@ -328,7 +329,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
328329
else if (pynargs > clrnargs && clrnargs > 0 &&
329330
Attribute.IsDefined(pi[clrnargs - 1], typeof(ParamArrayAttribute)))
330331
{
331-
// This is a spam(params object[] egg) style method
332+
// This is a `foo(params object[] bar)` style method
332333
match = true;
333334
arrayStart = clrnargs - 1;
334335
}

0 commit comments

Comments
 (0)
0