diff options
author | Joe Shaw <joe@novell.com> | 2006-02-09 19:57:42 +0000 |
---|---|---|
committer | John Palmieri <johnp@remedyz.boston.redhat.com> | 2006-06-28 08:15:42 -0400 |
commit | aaa2fbe9c87cfa25e7b8779fb61895093d5f1831 (patch) | |
tree | a29d9f17f0f2acb102c423d143547fe71862d040 | |
parent | 48b1c5abb8fc2f0695f83ca7a2d52a78b2dc75eb (diff) |
2006-02-09 Joe Shaw <joeshaw@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.
-rw-r--r-- | mono/Arguments.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mono/Arguments.cs b/mono/Arguments.cs index 61ae443..25f89da 100644 --- a/mono/Arguments.cs +++ b/mono/Arguments.cs @@ -10,7 +10,7 @@ namespace DBus 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 @@ namespace DBus 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; |