mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Added interface dispatch for structs
This commit is contained in:
parent
d1d9cb37be
commit
186462e0ac
1 changed files with 6 additions and 1 deletions
|
@ -275,6 +275,11 @@ namespace System.Reflection
|
|||
else
|
||||
{
|
||||
TypeInstance.InterfaceData* interfaceData = null;
|
||||
var variantType = target.VariantType;
|
||||
if (variantType.IsPointer)
|
||||
thisType = variantType.UnderlyingType as TypeInstance;
|
||||
else
|
||||
thisType = variantType as TypeInstance;
|
||||
var checkType = thisType;
|
||||
CheckLoop: while (checkType != null)
|
||||
{
|
||||
|
@ -293,7 +298,7 @@ namespace System.Reflection
|
|||
if (interfaceData == null)
|
||||
return .Err(.InvalidTarget);
|
||||
|
||||
//funcPtr = *(thisType.[Friend]mInterfaceMethodTable + mMethodData.mVirtualIdx);
|
||||
funcPtr = *(thisType.[Friend]mInterfaceMethodTable + interfaceData.mStartInterfaceTableIdx + mMethodData.mMethodIdx);
|
||||
}
|
||||
|
||||
ifaceOffset = mTypeInstance.[Friend]mMemberDataOffset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue