2008-10-27 Stephane Delcroix <sdelcroix@novell.com>

* glib/ListBase.cs: DataMarshal: create the right object for *Adapter
	list items.

svn path=/trunk/gtk-sharp/; revision=117169
This commit is contained in:
Stephane Delcroix 2008-10-27 15:08:02 +00:00
parent dfd06255db
commit e7a4cbea59
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-10-27 Stephane Delcroix <sdelcroix@novell.com>
* glib/ListBase.cs: DataMarshal: create the right object for *Adapter
list items.
2008-10-08 Mike Gorse <mgorse@novell.com>
* atk/Object.custom: Pass Handle in EmitChildrenChanged (fix critical)

View file

@ -169,7 +169,11 @@ namespace GLib {
ret = (int) data;
else if (element_type.IsValueType)
ret = Marshal.PtrToStructure (data, element_type);
else
else if (element_type.IsInterface) {
Type adapter_type = element_type.Assembly.GetType (element_type.FullName + "Adapter");
System.Reflection.MethodInfo method = adapter_type.GetMethod ("GetObject", new Type[] {typeof(IntPtr), typeof(bool)});
ret = method.Invoke (null, new object[] {data, false});
} else
ret = Activator.CreateInstance (element_type, new object[] {data});
} else if (Object.IsObject (data))