summaryrefslogtreecommitdiff
path: root/gstreamer-sharp/Marshaller.cs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-09-20 10:19:49 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-09-20 10:22:16 +0200
commit80a5794fc1eef8f54b21b9792cd1fb6f85fb7df0 (patch)
tree58c0ab5fefd51af90da29e0e26becc6db96018a2 /gstreamer-sharp/Marshaller.cs
parentbd9052c00a0088b04f177ccdb38c0844d1bcfd07 (diff)
Fix indention everywhere
Diffstat (limited to 'gstreamer-sharp/Marshaller.cs')
-rw-r--r--gstreamer-sharp/Marshaller.cs56
1 files changed, 27 insertions, 29 deletions
diff --git a/gstreamer-sharp/Marshaller.cs b/gstreamer-sharp/Marshaller.cs
index 9aa0943..a91a76f 100644
--- a/gstreamer-sharp/Marshaller.cs
+++ b/gstreamer-sharp/Marshaller.cs
@@ -4,43 +4,41 @@ using System.Runtime.InteropServices;
using Gst.GLib;
namespace Gst {
- internal static class Marshaller {
+ internal static class Marshaller {
- public static IntPtr StringArrayToNullTermPointer (string[] strs)
- {
- if (strs == null)
- return IntPtr.Zero;
+ public static IntPtr StringArrayToNullTermPointer (string[] strs) {
+ if (strs == null)
+ return IntPtr.Zero;
- IntPtr result = Gst.GLib.Marshaller.Malloc ((ulong) ((strs.Length + 1) * IntPtr.Size));
+ IntPtr result = Gst.GLib.Marshaller.Malloc ( (ulong) ( (strs.Length + 1) * IntPtr.Size));
- for (int i = 0; i < strs.Length; i++)
- Marshal.WriteIntPtr (result, i * IntPtr.Size, Gst.GLib.Marshaller.StringToPtrGStrdup (strs [i]));
+ for (int i = 0; i < strs.Length; i++)
+ Marshal.WriteIntPtr (result, i * IntPtr.Size, Gst.GLib.Marshaller.StringToPtrGStrdup (strs [i]));
- Marshal.WriteIntPtr (result, strs.Length * IntPtr.Size, IntPtr.Zero);
+ Marshal.WriteIntPtr (result, strs.Length * IntPtr.Size, IntPtr.Zero);
- return result;
- }
+ return result;
+ }
- [DllImport("libglib-2.0-0.dll")]
- static extern void g_strfreev (IntPtr mem);
+ [DllImport ("libglib-2.0-0.dll") ]
+ static extern void g_strfreev (IntPtr mem);
- public static string[] NullTermPtrToStringArray (IntPtr null_term_array, bool owned)
- {
- if (null_term_array == IntPtr.Zero)
- return new string [0];
+ public static string[] NullTermPtrToStringArray (IntPtr null_term_array, bool owned) {
+ if (null_term_array == IntPtr.Zero)
+ return new string [0];
- int count = 0;
- System.Collections.ArrayList result = new System.Collections.ArrayList ();
- IntPtr s = Marshal.ReadIntPtr (null_term_array, count++ * IntPtr.Size);
- while (s != IntPtr.Zero) {
- result.Add (Gst.GLib.Marshaller.Utf8PtrToString (s));
- s = Marshal.ReadIntPtr (null_term_array, count++ * IntPtr.Size);
- }
+ int count = 0;
+ System.Collections.ArrayList result = new System.Collections.ArrayList ();
+ IntPtr s = Marshal.ReadIntPtr (null_term_array, count++ * IntPtr.Size);
+ while (s != IntPtr.Zero) {
+ result.Add (Gst.GLib.Marshaller.Utf8PtrToString (s));
+ s = Marshal.ReadIntPtr (null_term_array, count++ * IntPtr.Size);
+ }
- if (owned)
- g_strfreev (null_term_array);
+ if (owned)
+ g_strfreev (null_term_array);
- return (string[]) result.ToArray (typeof(string));
- }
- }
+ return (string[]) result.ToArray (typeof (string));
+ }
+ }
}