Skip to content

Commit

Permalink
Merge branch 'pr/ienumerable' into pr/allchanges
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/runtime/Converter.cs
  • Loading branch information
eirannejad committed Dec 8, 2023
2 parents f06bf94 + c9ed7c9 commit 8054a12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/runtime/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ internal static bool ToManagedValue(BorrowedReference value, Type obType,
return ToArray(value, arrayType, out result, setError);
}

// Convert python iterables to IEnumerable argument
if (obType == typeof(IEnumerable))
{
return ToArray(value, typeof(object[]), out result, setError);
}

// Conversion to 'Object' is done based on some reasonable default
// conversions (Python string -> managed string).
if (obType == objectType)
Expand Down

0 comments on commit 8054a12

Please sign in to comment.