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

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2013-08-06 16:45:10 +0400
committerjfrijters <jfrijters>2013-08-06 16:45:10 +0400
commit0a430cd473dcc753772b708a66444fbbceabbc21 (patch)
tree9fed600d7bb22a76bd2df3331f3db7469f5a94c7
parent19c7daaf38a3c170da96fadb0c66fa00d9c46f4f (diff)
- Renamed GetInnerClassName() to AllocNestedTypeName().
- Use StringComparison.Ordinal when checking inner vs outer class names.
-rw-r--r--runtime/DynamicTypeWrapper.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/DynamicTypeWrapper.cs b/runtime/DynamicTypeWrapper.cs
index 4ea4a803..0edfc92e 100644
--- a/runtime/DynamicTypeWrapper.cs
+++ b/runtime/DynamicTypeWrapper.cs
@@ -731,7 +731,7 @@ namespace IKVM.Internal
}
// LAMESPEC the CLI spec says interfaces cannot contain nested types (Part.II, 9.6), but that rule isn't enforced
// (and broken by J# as well), so we'll just ignore it too.
- typeBuilder = outer.DefineNestedType(GetInnerClassName(outerClassWrapper.Name, f.Name), typeAttribs);
+ typeBuilder = outer.DefineNestedType(AllocNestedTypeName(outerClassWrapper.Name, f.Name), typeAttribs);
}
else
{
@@ -760,7 +760,7 @@ namespace IKVM.Internal
{
// LAMESPEC the CLI spec says interfaces cannot contain nested types (Part.II, 9.6), but that rule isn't enforced
// (and broken by J# as well), so we'll just ignore it too.
- typeBuilder = outer.DefineNestedType(GetInnerClassName(outerClassWrapper.Name, f.Name), typeAttribs);
+ typeBuilder = outer.DefineNestedType(AllocNestedTypeName(outerClassWrapper.Name, f.Name), typeAttribs);
}
else
#endif // STATIC_COMPILER
@@ -1293,10 +1293,10 @@ namespace IKVM.Internal
private static bool CheckInnerOuterNames(string inner, string outer)
{
// do some sanity checks on the inner/outer class names
- return inner.Length > outer.Length + 1 && inner[outer.Length] == '$' && inner.StartsWith(outer);
+ return inner.Length > outer.Length + 1 && inner[outer.Length] == '$' && inner.StartsWith(outer, StringComparison.Ordinal);
}
- private string GetInnerClassName(string outer, string inner)
+ private string AllocNestedTypeName(string outer, string inner)
{
Debug.Assert(CheckInnerOuterNames(inner, outer));
if (nestedTypeNames == null)
@@ -1826,7 +1826,7 @@ namespace IKVM.Internal
{
typeAttributes |= TypeAttributes.NestedAssembly;
}
- attributeTypeBuilder = outer.DefineNestedType(o.GetInnerClassName(o.outerClassWrapper.Name, name + "Attribute"), typeAttributes, annotationAttributeBaseType.TypeAsBaseType);
+ attributeTypeBuilder = outer.DefineNestedType(o.AllocNestedTypeName(o.outerClassWrapper.Name, name + "Attribute"), typeAttributes, annotationAttributeBaseType.TypeAsBaseType);
}
else
{