You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
45
external/ikvm/reflect/Emit/MethodBuilder.cs
vendored
45
external/ikvm/reflect/Emit/MethodBuilder.cs
vendored
@@ -255,32 +255,27 @@ namespace IKVM.Reflection.Emit
|
||||
|
||||
public void SetCustomAttribute(CustomAttributeBuilder customBuilder)
|
||||
{
|
||||
Universe u = this.ModuleBuilder.universe;
|
||||
Type type = customBuilder.Constructor.DeclaringType;
|
||||
if (type == u.System_Runtime_InteropServices_DllImportAttribute)
|
||||
switch (customBuilder.KnownCA)
|
||||
{
|
||||
attributes |= MethodAttributes.PinvokeImpl;
|
||||
SetDllImportPseudoCustomAttribute(customBuilder.DecodeBlob(this.Module.Assembly));
|
||||
}
|
||||
else if (type == u.System_Runtime_CompilerServices_MethodImplAttribute)
|
||||
{
|
||||
SetMethodImplAttribute(customBuilder.DecodeBlob(this.Module.Assembly));
|
||||
}
|
||||
else if (type == u.System_Runtime_InteropServices_PreserveSigAttribute)
|
||||
{
|
||||
implFlags |= MethodImplAttributes.PreserveSig;
|
||||
}
|
||||
else if (type == u.System_Runtime_CompilerServices_SpecialNameAttribute)
|
||||
{
|
||||
attributes |= MethodAttributes.SpecialName;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == u.System_Security_SuppressUnmanagedCodeSecurityAttribute)
|
||||
{
|
||||
case KnownCA.DllImportAttribute:
|
||||
SetDllImportPseudoCustomAttribute(customBuilder.DecodeBlob(this.Module.Assembly));
|
||||
attributes |= MethodAttributes.PinvokeImpl;
|
||||
break;
|
||||
case KnownCA.MethodImplAttribute:
|
||||
SetMethodImplAttribute(customBuilder.DecodeBlob(this.Module.Assembly));
|
||||
break;
|
||||
case KnownCA.PreserveSigAttribute:
|
||||
implFlags |= MethodImplAttributes.PreserveSig;
|
||||
break;
|
||||
case KnownCA.SpecialNameAttribute:
|
||||
attributes |= MethodAttributes.SpecialName;
|
||||
break;
|
||||
case KnownCA.SuppressUnmanagedCodeSecurityAttribute:
|
||||
attributes |= MethodAttributes.HasSecurity;
|
||||
}
|
||||
this.ModuleBuilder.SetCustomAttribute(pseudoToken, customBuilder);
|
||||
goto default;
|
||||
default:
|
||||
this.ModuleBuilder.SetCustomAttribute(pseudoToken, customBuilder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +377,7 @@ namespace IKVM.Reflection.Emit
|
||||
gtpb = new GenericTypeParameterBuilder[names.Length];
|
||||
for (int i = 0; i < names.Length; i++)
|
||||
{
|
||||
gtpb[i] = new GenericTypeParameterBuilder(names[i], null, this, i);
|
||||
gtpb[i] = new GenericTypeParameterBuilder(names[i], this, i);
|
||||
}
|
||||
return (GenericTypeParameterBuilder[])gtpb.Clone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user