Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert whitespace
  • Loading branch information
koubaa committed Dec 4, 2019
commit c6fd7686935f5d20d41ca1f14202514dbb7cb9f2
10 changes: 6 additions & 4 deletions src/runtime/converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -878,14 +878,16 @@ private static bool ToListOfT(IntPtr value, Type elementType, out object result)

var listType = typeof(List<>);
var constructedListType = listType.MakeGenericType(elementType);
IList list = IsSeqObj ? (IList)Activator.CreateInstance(constructedListType, new Object[] { (int)len }) :
(IList)Activator.CreateInstance(constructedListType);
IList list = IsSeqObj ? (IList) Activator.CreateInstance(constructedListType, new Object[] { (int)len }) :
(IList) Activator.CreateInstance(constructedListType);
IntPtr item;

while ((item = Runtime.PyIter_Next(IterObject)) != IntPtr.Zero) {
while ((item = Runtime.PyIter_Next(IterObject)) != IntPtr.Zero)
{
object obj = null;

if (!Converter.ToManaged(item, elementType, out obj, true)) {
if (!Converter.ToManaged(item, elementType, out obj, true))
{
Runtime.XDecref(item);
return false;
}
Expand Down