Fix dynamic signals on 64 bit architectures

sizeof(GClosure) is 32 on 64 bit
This commit is contained in:
Sebastian Dröge 2009-04-04 14:28:19 +02:00
parent ba8f8562b5
commit 10b4f125d0

View file

@ -93,7 +93,8 @@ namespace GLib {
si.RegisteredHandler = newHandler;
}
else {
IntPtr closure = g_closure_new_simple(16, IntPtr.Zero);
/* We use 32 as this is correct for 32 bit and 64 bit architectures */
IntPtr closure = g_closure_new_simple(32, IntPtr.Zero);
g_closure_set_meta_marshal(closure, (IntPtr) GCHandle.Alloc(k), marshalHandler);
uint signalId = g_signal_connect_closure(o.Handle, name, closure, after);
SignalHandlers.Add(k, new SignalInfo(signalId, closure, handler));