Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / Marshal.cs
index 424bb0b26079e1fd306dce70af519a8c634d7e70..b95713d4e0d013c99a68a7bc78cb4a3587728605 100644 (file)
@@ -788,7 +788,7 @@ namespace System.Runtime.InteropServices
                                return *(short*)addr;
 
                        short s;
-                       String.memcpy ((byte*)&s, (byte*)ptr, 2);
+                       Buffer.Memcpy ((byte*)&s, (byte*)ptr, 2);
                        return s;
                }
 
@@ -800,7 +800,7 @@ namespace System.Runtime.InteropServices
                                return *(short*)addr;
 
                        short s;
-                       String.memcpy ((byte*)&s, addr, 2);
+                       Buffer.Memcpy ((byte*)&s, addr, 2);
                        return s;
                }
 
@@ -820,7 +820,7 @@ namespace System.Runtime.InteropServices
                                return *(int*)addr;
 
                        int s;
-                       String.memcpy ((byte*)&s, addr, 4);
+                       Buffer.Memcpy ((byte*)&s, addr, 4);
                        return s;
                }
 
@@ -833,7 +833,7 @@ namespace System.Runtime.InteropServices
                                return *(int*)addr;
                        else {
                                int s;
-                               String.memcpy ((byte*)&s, addr, 4);
+                               Buffer.Memcpy ((byte*)&s, addr, 4);
                                return s;
                        }
                }
@@ -857,7 +857,7 @@ namespace System.Runtime.InteropServices
                                return *(long*)ptr;
 
                        long s;
-                       String.memcpy ((byte*)&s, addr, 8);
+                       Buffer.Memcpy ((byte*)&s, addr, 8);
                        return s;
                }
 
@@ -869,7 +869,7 @@ namespace System.Runtime.InteropServices
                                return *(long*)addr;
                        
                        long s;
-                       String.memcpy ((byte*)&s, addr, 8);
+                       Buffer.Memcpy ((byte*)&s, addr, 8);
                        return s;
                }
 
@@ -1171,7 +1171,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 1) == 0)
                                *(short*)addr = val;
                        else
-                               String.memcpy (addr, (byte*)&val, 2);
+                               Buffer.Memcpy (addr, (byte*)&val, 2);
                }
 
                public static unsafe void WriteInt16 (IntPtr ptr, int ofs, short val)
@@ -1181,7 +1181,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 1) == 0)
                                *(short*)addr = val;
                        else {
-                               String.memcpy (addr, (byte*)&val, 2);
+                               Buffer.Memcpy (addr, (byte*)&val, 2);
                        }
                }
 
@@ -1215,7 +1215,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 3) == 0) 
                                *(int*)addr = val;
                        else {
-                               String.memcpy (addr, (byte*)&val, 4);
+                               Buffer.Memcpy (addr, (byte*)&val, 4);
                        }
                }
 
@@ -1226,7 +1226,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 3) == 0) 
                                *(int*)addr = val;
                        else {
-                               String.memcpy (addr, (byte*)&val, 4);
+                               Buffer.Memcpy (addr, (byte*)&val, 4);
                        }
                }
 
@@ -1246,7 +1246,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 7) == 0) 
                                *(long*)addr = val;
                        else 
-                               String.memcpy (addr, (byte*)&val, 8);
+                               Buffer.Memcpy (addr, (byte*)&val, 8);
                }
 
                public static unsafe void WriteInt64 (IntPtr ptr, int ofs, long val)
@@ -1258,7 +1258,7 @@ namespace System.Runtime.InteropServices
                        if (((uint)addr & 7) == 0) 
                                *(long*)addr = val;
                        else 
-                               String.memcpy (addr, (byte*)&val, 8);
+                               Buffer.Memcpy (addr, (byte*)&val, 8);
                }
 
                [MonoTODO]