mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-07 22:30:37 +00:00
* Type.cs: Updated list of non CLS-compliant types.
* Parameter.cs: Changed [In] and [Out] attributes to [InAttribute] and [OutAttribute] to work around strange gmcs 2.0 bug.
This commit is contained in:
parent
6f57ac0f6d
commit
336d6b4bef
|
@ -224,9 +224,9 @@ namespace Bind.Structures
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
if (Flow == FlowDirection.Out)
|
if (Flow == FlowDirection.Out)
|
||||||
sb.Append("[Out] ");
|
sb.Append("[OutAttribute] ");
|
||||||
else if (Flow == FlowDirection.Undefined)
|
else if (Flow == FlowDirection.Undefined)
|
||||||
sb.Append("[In, Out] ");
|
sb.Append("[InAttribute, OutAttribute] ");
|
||||||
|
|
||||||
if (Reference)
|
if (Reference)
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,7 +180,26 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
bool compliant = !(CurrentType.Contains("UInt") || CurrentType.Contains("SByte"));
|
bool compliant = true;
|
||||||
|
|
||||||
|
switch (CurrentType.ToLower())
|
||||||
|
{
|
||||||
|
case "sbyte":
|
||||||
|
case "ushort":
|
||||||
|
case "uint":
|
||||||
|
case "ulong":
|
||||||
|
case "uintptr":
|
||||||
|
compliant = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
compliant = Pointer == 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return compliant;
|
||||||
|
|
||||||
|
/*
|
||||||
if (Pointer != 0)
|
if (Pointer != 0)
|
||||||
{
|
{
|
||||||
compliant &= CurrentType.Contains("IntPtr"); // IntPtr's are CLSCompliant.
|
compliant &= CurrentType.Contains("IntPtr"); // IntPtr's are CLSCompliant.
|
||||||
|
@ -188,6 +207,7 @@ namespace Bind.Structures
|
||||||
compliant |= (Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) != Settings.Legacy.None;
|
compliant |= (Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) != Settings.Legacy.None;
|
||||||
}
|
}
|
||||||
return compliant;
|
return compliant;
|
||||||
|
*/
|
||||||
//return compliant && (!Pointer || CurrentType.Contains("IntPtr"));
|
//return compliant && (!Pointer || CurrentType.Contains("IntPtr"));
|
||||||
//return compliant && !(Pointer && ((Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) == Settings.Legacy.None));
|
//return compliant && !(Pointer && ((Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) == Settings.Legacy.None));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue