Skip to content

Commit

Permalink
Allow non-primitive struct returns to not require a stub. Fixes dotne…
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Dec 4, 2020
1 parent 4a200d1 commit 0302e18
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/coreclr/src/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3227,21 +3227,7 @@ BOOL NDirect::MarshalingRequired(
return TRUE;
}
#endif

// return value is fine as long as it can be normalized to an integer
if (i == 0)
{
CorElementType normalizedType = hndArgType.GetInternalCorElementType();
if (normalizedType == ELEMENT_TYPE_VALUETYPE)
{
// it is a structure even after normalization
return TRUE;
}
}
else
{
dwStackSize += StackElemSize(hndArgType.GetSize());
}
dwStackSize += StackElemSize(hndArgType.GetSize());
break;
}

Expand Down

0 comments on commit 0302e18

Please sign in to comment.