mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +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
|
else
|
||||||
{
|
{
|
||||||
TypeInstance.InterfaceData* interfaceData = null;
|
TypeInstance.InterfaceData* interfaceData = null;
|
||||||
|
var variantType = target.VariantType;
|
||||||
|
if (variantType.IsPointer)
|
||||||
|
thisType = variantType.UnderlyingType as TypeInstance;
|
||||||
|
else
|
||||||
|
thisType = variantType as TypeInstance;
|
||||||
var checkType = thisType;
|
var checkType = thisType;
|
||||||
CheckLoop: while (checkType != null)
|
CheckLoop: while (checkType != null)
|
||||||
{
|
{
|
||||||
|
@ -293,7 +298,7 @@ namespace System.Reflection
|
||||||
if (interfaceData == null)
|
if (interfaceData == null)
|
||||||
return .Err(.InvalidTarget);
|
return .Err(.InvalidTarget);
|
||||||
|
|
||||||
//funcPtr = *(thisType.[Friend]mInterfaceMethodTable + mMethodData.mVirtualIdx);
|
funcPtr = *(thisType.[Friend]mInterfaceMethodTable + interfaceData.mStartInterfaceTableIdx + mMethodData.mMethodIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
ifaceOffset = mTypeInstance.[Friend]mMemberDataOffset;
|
ifaceOffset = mTypeInstance.[Friend]mMemberDataOffset;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue