dbus/mono Arguments.cs,1.10,1.11

Joe Shaw joe at freedesktop.org
Thu Feb 9 11:57:44 PST 2006


Update of /cvs/dbus/dbus/mono
In directory gabe:/tmp/cvs-serv31131/mono

Modified Files:
	Arguments.cs 
Log Message:
2006-02-09  Joe Shaw  <joeshaw at novell.com

	* mono/Arguments.cs: Fix a magic number in the mono bindings
	that doesn't work on 64 bit arches.  Patch from Peter Johanson.

Index: Arguments.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/Arguments.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Arguments.cs	9 Mar 2005 04:36:15 -0000	1.10
+++ Arguments.cs	9 Feb 2006 19:57:42 -0000	1.11
@@ -10,7 +10,7 @@
 	public class Arguments : IEnumerable, IDisposable
   {
     // Must follow sizeof(DBusMessageIter)
-    internal const int DBusMessageIterSize = 14*4;
+    internal static readonly int DBusMessageIterSize = Marshal.SizeOf (typeof(_DBusMessageIter));
     private static Hashtable dbusTypes = null;
     private Message message;
     private IntPtr appenderIter;
@@ -240,6 +240,25 @@
       return new ArgumentsEnumerator(this);
     }
 
+    [StructLayout(LayoutKind.Sequential)]
+    private class _DBusMessageIter
+    {
+       IntPtr dummy1;
+       IntPtr dummy2;
+       int    dummy3;
+       int    dummy4;
+       int    dummy5;
+       int    dummy6;
+       int    dummy7;
+       int    dummy8;
+       int    dummy9;
+       int    dummy10;
+       int    dummy11;
+       int    pad1;
+       int    pad2;
+       IntPtr pad3;
+   }
+	    
     private class ArgumentsEnumerator : IEnumerator
     {
       private Arguments arguments;



More information about the dbus-commit mailing list