Skip to content

Commit 37b0f20

Browse files
xmcclurejonpryor
authored andcommitted
Bump to cecil/master/d0cb2b78
Update cecil for parity with mono/2017-02
1 parent 65a0157 commit 37b0f20

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed

external/cecil

Submodule cecil updated from 172c907 to d0cb2b7

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static class AssemblyResolverCoda {
4444

4545
public static AssemblyDefinition GetAssembly (this IAssemblyResolver resolver, string fileName)
4646
{
47-
return resolver.Resolve (Path.GetFileNameWithoutExtension (fileName));
47+
return resolver.Resolve (AssemblyNameReference.Parse (Path.GetFileNameWithoutExtension (fileName)));
4848
}
4949
}
5050

src/Java.Interop/Java.Interop/JniType.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public sealed class JniType : IDisposable {
1212

1313
public static unsafe JniType DefineClass (string name, JniObjectReference loader, byte[] classFileData)
1414
{
15+
if (classFileData == null)
16+
return null;
1517
fixed (byte* buf = classFileData) {
1618
var lref = JniEnvironment.Types.DefineClass (name, loader, (IntPtr) buf, classFileData.Length);
1719
return new JniType (ref lref, JniObjectReferenceOptions.CopyAndDispose);
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
diff --git a/Mono.Cecil.Cil/Symbols.cs b/Mono.Cecil.Cil/Symbols.cs
2-
index 426c4a7..1bc138d 100644
2+
index 6ca158e..dbca57a 100644
33
--- a/Mono.Cecil.Cil/Symbols.cs
44
+++ b/Mono.Cecil.Cil/Symbols.cs
5-
@@ -186,7 +186,7 @@ namespace Mono.Cecil.Cil {
6-
var cecil_name = typeof (SymbolProvider).Assembly.GetName ();
5+
@@ -637,7 +637,7 @@ namespace Mono.Cecil.Cil {
6+
var cecil_name = typeof (SymbolProvider).GetAssembly ().GetName ();
77

88
var name = new SR.AssemblyName {
9-
- Name = "Mono.Cecil." + symbol_kind,
10-
+ Name = "Xamarin.Android.Cecil." + symbol_kind,
9+
- Name = "Mono.Cecil." + symbolKind,
10+
+ Name = "Xamarin.Android.Cecil." + symbolKind,
1111
Version = cecil_name.Version,
1212
};
1313

14-
diff --git a/ProjectInfo.cs b/ProjectInfo.cs
15-
index 8d427a7..59bc253 100644
16-
--- a/ProjectInfo.cs
17-
+++ b/ProjectInfo.cs
18-
@@ -10,7 +10,7 @@
19-
using System.Reflection;
20-
using System.Runtime.InteropServices;
21-
22-
-[assembly: AssemblyProduct ("Mono.Cecil")]
23-
+[assembly: AssemblyProduct ("Xamarin.Android.Cecil")]
24-
[assembly: AssemblyCopyright ("Copyright © 2008 - 2015 Jb Evain")]
25-
26-
[assembly: ComVisible (false)]
2714
diff --git a/Mono.Cecil/AssemblyInfo.cs b/Mono.Cecil/AssemblyInfo.cs
28-
index 40cc0d4..41e159f 100644
15+
index 4d32f2b..9726954 100644
2916
--- a/Mono.Cecil/AssemblyInfo.cs
3017
+++ b/Mono.Cecil/AssemblyInfo.cs
31-
@@ -10,7 +10,7 @@ using System.Reflection;
18+
@@ -12,7 +12,7 @@ using System.Reflection;
3219
using System.Runtime.CompilerServices;
3320
using System.Runtime.InteropServices;
3421

3522
-[assembly: AssemblyTitle ("Mono.Cecil")]
3623
+[assembly: AssemblyTitle ("Xamarin.Android.Cecil")]
3724

25+
#if !PCL && !NET_CORE
3826
[assembly: Guid ("fd225bb4-fa53-44b2-a6db-85f5e48dcb54")]
27+
diff --git a/ProjectInfo.cs b/ProjectInfo.cs
28+
index 6bfdedf..95b940c 100644
29+
--- a/ProjectInfo.cs
30+
+++ b/ProjectInfo.cs
31+
@@ -10,7 +10,7 @@
32+
using System.Reflection;
33+
using System.Runtime.InteropServices;
34+
35+
-[assembly: AssemblyProduct ("Mono.Cecil")]
36+
+[assembly: AssemblyProduct ("Xamarin.Android.Cecil")]
37+
[assembly: AssemblyCopyright ("Copyright © 2008 - 2015 Jb Evain")]
3938

39+
#if !PCL

xa-gendarme-ignore.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ R: Gendarme.Rules.Correctness.CheckParametersNullityInVisibleMethodsRule
2424
M: System.Boolean Java.Interop.JniPeerMembers::UsesVirtualDispatch(Java.Interop.IJavaPeerable,System.Type)
2525
M: Java.Interop.JniPeerMembers Java.Interop.JniPeerMembers::GetPeerMembers(Java.Interop.IJavaPeerable)
2626

27+
# I suspect a gendarme bug; I don't see what it's talking about
28+
M: System.Void Java.Interop.JniArgumentValue::.ctor(Java.Interop.IJavaPeerable)
29+
2730

2831
R: Gendarme.Rules.Correctness.EnsureLocalDisposalRule
2932
# We don't *want* to dispose the value!
@@ -213,6 +216,10 @@ M: System.Void Java.Interop.NativeMethods::java_interop_jnienv_get_boolean_array
213216
M: System.Void Java.Interop.NativeMethods::java_interop_jnienv_set_boolean_array_region(System.IntPtr,System.IntPtr&,System.IntPtr,System.Int32,System.Int32,System.Boolean*)
214217
M: System.IntPtr Java.Interop.NativeMethods::java_interop_jnienv_get_primitive_array_critical(System.IntPtr,System.IntPtr,System.Boolean*)
215218

219+
R: Gendarme.Rules.Maintainability.AvoidAlwaysNullFieldRule
220+
# I suspect that this is a Roslyn bug; mcs output doesn't produce this.
221+
T: Java.Interop.JniRuntime/JniTypeManager/<CreateGetTypesForSimpleReferenceEnumerator>d__15
222+
216223

217224
R: Gendarme.Rules.Maintainability.AvoidLackOfCohesionOfMethodsRule
218225
# I'm not sure I understand "lack of cohesion" in this context, and the docs

0 commit comments

Comments
 (0)