FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add object type to methodbind · KLab/pythonnet@2cabc9f · GitHub

Repository navigation

Commit 2cabc9f

Browse files
committed
Add object type to methodbind
1 parent b7a3c7e commit 2cabc9f

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/runtime/methodbinder.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
375375
if (clrtype != null)
376376
{
377377
var typematch = false;
378-
if (pi[n].ParameterType != clrtype)
378+
if ((pi[n].ParameterType != typeof(object)) && (pi[n].ParameterType != clrtype))
379379
{
380380
IntPtr pytype = Converter.GetPythonTypeByAlias(pi[n].ParameterType);
381381
pyoptype = Runtime.PyObject_Type(op);

‎src/tests/test_method.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ def test_no_object_in_param():
781781
MethodTest.TestOverloadedNoObject("test")
782782

783783

784-
@pytest.mark.xfail(reason="Needs fixing. #203")
785784
def test_object_in_param():
786785
"""Test regression introduced by #151 in which Object method overloads
787786
aren't being used. See #203 for issue."""

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL