mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Boxed struct ptr changes.
This commit is contained in:
parent
ad2542eba6
commit
5af6428bf4
20 changed files with 573 additions and 327 deletions
|
@ -154,26 +154,35 @@ namespace System.Reflection
|
|||
Type underlyingType = argType.UnderlyingType;
|
||||
if ((paramType.IsPrimitive) && (underlyingType.IsTypedPrimitive)) // Boxed primitive?
|
||||
underlyingType = underlyingType.UnderlyingType;
|
||||
if (!underlyingType.IsSubtypeOf(paramType))
|
||||
|
||||
if (argType.IsBoxedStructPtr)
|
||||
{
|
||||
if (underlyingType.IsGenericType)
|
||||
dataPtr = *(void**)dataPtr;
|
||||
handled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!underlyingType.IsSubtypeOf(paramType))
|
||||
{
|
||||
var ptrTypedPrimitive = (SpecializedGenericType)underlyingType;
|
||||
if ((ptrTypedPrimitive.mTypeFlags.HasFlag(.Sys_PointerT)))
|
||||
if (underlyingType.IsGenericType)
|
||||
{
|
||||
let elementType = Type.GetType(ptrTypedPrimitive.mResolvedTypeRefs[0]);
|
||||
if (elementType == paramType)
|
||||
var ptrTypedPrimitive = (SpecializedGenericType)underlyingType;
|
||||
if ((ptrTypedPrimitive.mTypeFlags.HasFlag(.Sys_PointerT)))
|
||||
{
|
||||
dataPtr = *(void**)dataPtr;
|
||||
handled = true;
|
||||
let elementType = Type.GetType(ptrTypedPrimitive.mResolvedTypeRefs[0]);
|
||||
if (elementType == paramType)
|
||||
{
|
||||
dataPtr = *(void**)dataPtr;
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*if (underlyingType.IsSpecialType(TypeInstance.[Friend]sPointerTType, "System", "Pointer", 2))
|
||||
{
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
/*if (underlyingType.IsSpecialType(TypeInstance.[Friend]sPointerTType, "System", "Pointer", 2))
|
||||
{
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
if (!handled)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue