mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Added GetFieldReference, ability to explicitly reference in Variant
This commit is contained in:
parent
5cfe9e6196
commit
78dd56d6c5
11 changed files with 279 additions and 54 deletions
|
@ -137,7 +137,16 @@ namespace System.Reflection
|
|||
added = true;
|
||||
}
|
||||
else
|
||||
isValid = false;
|
||||
{
|
||||
if ((Type)argType != refParamType.UnderlyingType)
|
||||
isValid = false;
|
||||
|
||||
ffiParamList.Add(&FFIType.Pointer);
|
||||
int* stackDataPtr = scope:mixin int();
|
||||
*stackDataPtr = (int)dataPtr;
|
||||
ffiArgList.Add(stackDataPtr);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
else if (paramType.IsValueType)
|
||||
{
|
||||
|
@ -412,7 +421,22 @@ namespace System.Reflection
|
|||
added = true;
|
||||
}
|
||||
else
|
||||
isValid = false;
|
||||
{
|
||||
var elemType = argType.UnderlyingType;
|
||||
if (elemType != refParamType.UnderlyingType)
|
||||
{
|
||||
if (elemType.IsTypedPrimitive)
|
||||
elemType = elemType.UnderlyingType;
|
||||
if (elemType != refParamType.UnderlyingType)
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
ffiParamList.Add(&FFIType.Pointer);
|
||||
int* stackDataPtr = scope:mixin int();
|
||||
*stackDataPtr = (int)dataPtr;
|
||||
ffiArgList.Add(stackDataPtr);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
else if (paramType.IsValueType)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue