public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw)
{
// todo: add fast type check!
IntPtr pytype = Runtime.PyObject_TYPE(ob);
DelegateObject self = (DelegateObject)GetManagedObject(pytype);
CLRObject o = GetManagedObject(ob) as CLRObject;
if (o == null)
{
return Exceptions.RaiseTypeError("invalid argument");
}
Delegate d = o.inst as Delegate;
if (d == null)
{
return Exceptions.RaiseTypeError("invalid argument");
}
return self.binder.Invoke(ob, args, kw);
}