◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
26 changes: 18 additions & 8 deletions src/runtime/converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@ internal static IntPtr ToPython<T>(T value)
return ToPython(value, typeof(T));
}

internal static IntPtr ToPython(object value, Type type)
{
if (value is PyObject)
Expand Down Expand Up @@ -162,15 +179,8 @@ internal static IntPtr ToPython(object value, Type type)
var pyderived = value as IPythonDerivedType;
if (null != pyderived)
{
#if NETSTANDARD
return ClassDerivedObject.ToPython(pyderived);
#else
// if object is remote don't do this
if (!System.Runtime.Remoting.RemotingServices.IsTransparentProxy(pyderived))
{
return ClassDerivedObject.ToPython(pyderived);
}
#endif
}

// hmm - from Python, we almost never care what the declared
Expand Down
Toggle all file notes Toggle all file annotations