8000 adding object type to methodbind · vmuriart/pythonnet@01b36ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 01b36ae

Browse files
committed
adding object type to methodbind
patch for pythonnet#203 - not best solution though.
1 parent 7acf93f commit 01b36ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/methodbinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw,
344344
if (clrtype != null)
345345
{
346346
bool typematch = false;
347-
if (pi[n].ParameterType != clrtype)
347+
if ((pi[n].ParameterType != clrtype) && !(pi[n].ParameterType is object))
348348
{
349349
IntPtr pytype = Converter.GetPythonTypeByAlias(pi[n].ParameterType);
350350
pyoptype = Runtime.PyObject_Type(op);

0 commit comments

Comments
 (0)
0