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

Skip to content

Commit 4f87cba

Browse files
committed
adding object type to methodbind
patch for pythonnet#203 - not best solution though.
1 parent 01fe979 commit 4f87cba

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
@@ -383,7 +383,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
383383
if (clrtype != null)
384384
{
385385
var typematch = false;
386-
if (pi[n].ParameterType != clrtype)
386+
if ((pi[n].ParameterType != clrtype) && !(pi[n].ParameterType is object))
387387
{
388388
IntPtr pytype = Converter.GetPythonTypeByAlias(pi[n].ParameterType);
389389
pyoptype = Runtime.PyObject_Type(op);

0 commit comments

Comments
 (0)
0