Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2018-09-20 00:16:29 +0300
committerLudovic Henry <luhenry@microsoft.com>2018-09-20 00:16:29 +0300
commit7dd65f79a533eff981b95247e82214c34169cbff (patch)
treef020e9de0356aa93bac3a8ae8e22db05d1eb91b8
parent7c898271e733c7416f36e9c9df6aa61128ea3468 (diff)
[mono-api-html] Render something for fields with marshalling info. (#10698)
Fixes this warning when comparing Xamarin.iOS.dll: Comparison resulting in no changes (src: Public, HasFieldMarshal dst: Public) : <field name="EdgeTessellationFactor" attrib="4102" fieldtype="System.UInt16[]" /> <field name="EdgeTessellationFactor" attrib="6" fieldtype="System.UInt16[]" />
-rw-r--r--mcs/tools/mono-api-html/FieldComparer.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/mcs/tools/mono-api-html/FieldComparer.cs b/mcs/tools/mono-api-html/FieldComparer.cs
index 535205b2357..3c987768c1c 100644
--- a/mcs/tools/mono-api-html/FieldComparer.cs
+++ b/mcs/tools/mono-api-html/FieldComparer.cs
@@ -56,6 +56,18 @@ namespace Xamarin.ApiDiff {
change.AppendAdded ("[NonSerialized]\n");
}
}
+
+ var srcHasFieldMarshal = (source & FieldAttributes.HasFieldMarshal) != 0;
+ var tgtHasFieldMarshal = (target & FieldAttributes.HasFieldMarshal) != 0;
+ if (srcHasFieldMarshal != tgtHasFieldMarshal) {
+ // this is not a breaking change, so only render it if it changed.
+ if (srcHasFieldMarshal) {
+ change.AppendRemoved ("[MarshalAs]", false);
+ } else {
+ change.AppendAdded ("[MarshalAs]", false);
+ }
+ change.Append (Environment.NewLine);
+ }
}
// the visibility values are the same for MethodAttributes and FieldAttributes, so just use the same method.