Skip to content

Commit

Permalink
added support for IEnumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Aug 28, 2023
1 parent 1729698 commit c9ed7c9
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 @@ -357,6 +357,12 @@ internal static bool ToManagedValue(BorrowedReference value, Type obType,
return ToArray(value, obType, 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 c9ed7c9

Please sign in to comment.