Value: Make GetMethod more specific to avoid ambigous matches
This patch prevents GetMethod from throwing an AmbiguousMatchException because several constructors were found.
This commit is contained in:
parent
8885fa98af
commit
839a32d797
1 changed files with 1 additions and 1 deletions
|
@ -424,7 +424,7 @@ namespace GLib {
|
||||||
else if (t.IsSubclassOf (typeof (GLib.Opaque)))
|
else if (t.IsSubclassOf (typeof (GLib.Opaque)))
|
||||||
return (GLib.Opaque) this;
|
return (GLib.Opaque) this;
|
||||||
|
|
||||||
MethodInfo mi = t.GetMethod ("New", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
|
MethodInfo mi = t.GetMethod ("New", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy, null, new Type[] { typeof(IntPtr) }, null);
|
||||||
if (mi != null)
|
if (mi != null)
|
||||||
return mi.Invoke (null, new object[] {boxed_ptr});
|
return mi.Invoke (null, new object[] {boxed_ptr});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue