2008-08-27 Mike Kestner <mkestner@novell.com>
* generator/ManagedCallString.cs: fixes for data parameter hiding in native to managed callback generation. svn path=/trunk/gtk-sharp/; revision=111706
This commit is contained in:
parent
47e002a7d4
commit
568fd5e2a8
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-27 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* generator/ManagedCallString.cs: fixes for data parameter hiding
|
||||||
|
in native to managed callback generation.
|
||||||
|
|
||||||
2008-08-20 Mike Kestner <mkestner@novell.com>
|
2008-08-20 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/Object.cs:
|
* glib/Object.cs:
|
||||||
|
|
|
@ -35,15 +35,17 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
public ManagedCallString (Parameters parms, bool drop_first)
|
public ManagedCallString (Parameters parms, bool drop_first)
|
||||||
{
|
{
|
||||||
|
bool has_cb = false;
|
||||||
for (int i = drop_first ? 1 : 0; i < parms.Count; i ++) {
|
for (int i = drop_first ? 1 : 0; i < parms.Count; i ++) {
|
||||||
Parameter p = parms [i];
|
Parameter p = parms [i];
|
||||||
if (p.IsLength && i > 0 && parms [i-1].IsString)
|
if (p.IsLength && i > 0 && parms [i-1].IsString)
|
||||||
continue;
|
continue;
|
||||||
else if (p.Scope == "notified") {
|
else if (p.Scope == "notified") {
|
||||||
|
has_cb = true;
|
||||||
user_data_param = parms[i+1].Name;
|
user_data_param = parms[i+1].Name;
|
||||||
destroy_param = parms[i+2].Name;
|
destroy_param = parms[i+2].Name;
|
||||||
i += 2;
|
i += 2;
|
||||||
} else if (p.IsUserData && (i == parms.Count - 1) && (parms.HideData || parms [i-1].Generatable is CallbackGen)) {
|
} else if (p.IsUserData && (parms.HideData || has_cb)) {
|
||||||
user_data_param = p.Name;
|
user_data_param = p.Name;
|
||||||
continue;
|
continue;
|
||||||
} else if (p is ErrorParameter) {
|
} else if (p is ErrorParameter) {
|
||||||
|
@ -54,9 +56,10 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
if (p.PassAs != String.Empty && (p.Name != p.FromNative (p.Name)))
|
if (p.PassAs != String.Empty && (p.Name != p.FromNative (p.Name)))
|
||||||
this.special.Add (true);
|
this.special.Add (true);
|
||||||
else if (p.Generatable is CallbackGen)
|
else if (p.Generatable is CallbackGen) {
|
||||||
|
has_cb = true;
|
||||||
this.special.Add (true);
|
this.special.Add (true);
|
||||||
else
|
} else
|
||||||
this.special.Add (false);
|
this.special.Add (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue