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:
authorSebastien Pouliot <sebastien@ximian.com>2009-10-07 17:46:13 +0400
committerSebastien Pouliot <sebastien@ximian.com>2009-10-07 17:46:13 +0400
commitd4674914b900cba323c2cde86e185b57553fa224 (patch)
tree458936ce848cbfaefa4b9afa26262482aa51a41f
parente7702bf35da72b2f726a4aa7e0fd394276885b80 (diff)
2009-10-07 Sebastien Pouliot <sebastien@ximian.com>moon-1.99.6
* String.cs: Remove unsafe code duplication in ToCharArray. Define out the unused InternalStrcpy icalls * StringComparer.cs: Seal internal/private inner classes. [Backport r143651] svn path=/branches/mono-2-6/mcs/; revision=143653
-rw-r--r--mcs/class/corlib/System/ChangeLog7
-rw-r--r--mcs/class/corlib/System/String.cs11
-rw-r--r--mcs/class/corlib/System/StringComparer.cs4
3 files changed, 13 insertions, 9 deletions
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index 42211afb582..4a9ee5cd5b8 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * String.cs: Remove unsafe code duplication in ToCharArray.
+ Define out the unused InternalStrcpy icalls
+ * StringComparer.cs: Seal internal/private inner classes.
+ [Backport r143651]
+
2009-10-06 Sebastien Pouliot <sebastien@ximian.com>
* Decimal.cs: Use Compare method instead of directly using the
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index 05efca83a0b..7fe8828ce77 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -184,12 +184,9 @@ namespace System
CharCopy (dest + destinationIndex, src + sourceIndex, count);
}
- public unsafe char[] ToCharArray ()
+ public char[] ToCharArray ()
{
- char[] tmp = new char [length];
- fixed (char* dest = tmp, src = this)
- CharCopy (dest, src, length);
- return tmp;
+ return ToCharArray (0, length);
}
public unsafe char[] ToCharArray (int startIndex, int length)
@@ -3077,7 +3074,7 @@ namespace System
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static String InternalAllocateStr (int length);
-
+#if false
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static void InternalStrcpy (String dest, int destPos, String src);
@@ -3089,7 +3086,7 @@ namespace System
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static void InternalStrcpy (String dest, int destPos, char[] chars, int sPos, int count);
-
+#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static string InternalIntern (string str);
diff --git a/mcs/class/corlib/System/StringComparer.cs b/mcs/class/corlib/System/StringComparer.cs
index 84f76b19044..54be9eda647 100644
--- a/mcs/class/corlib/System/StringComparer.cs
+++ b/mcs/class/corlib/System/StringComparer.cs
@@ -145,7 +145,7 @@ namespace System
}
[Serializable]
- class CultureAwareComparer : StringComparer
+ sealed class CultureAwareComparer : StringComparer
{
readonly bool _ignoreCase;
readonly CompareInfo _compareInfo;
@@ -180,7 +180,7 @@ namespace System
}
[Serializable]
- internal class OrdinalComparer : StringComparer
+ internal sealed class OrdinalComparer : StringComparer
{
readonly bool _ignoreCase;