Skip to content

Commit

Permalink
Add comment for IsReturnStructLarge workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Sep 17, 2018
1 parent 280f8c7 commit f692434
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SharpGen/Model/CsCallable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public bool IsReturnStructLarge
{
get
{
// Workaround for https://github.com/dotnet/coreclr/issues/19474. This workaround is sufficient
// for DirectX on Windows x86 and x64. It may produce incorrect code on other platforms depending
// on the calling convention details.
if ((ReturnValue.MarshalType ?? ReturnValue.PublicType) is CsStruct csStruct)
{
return csStruct.Size > MaxSizeReturnParameter;
Expand Down

0 comments on commit f692434

Please sign in to comment.