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>
|
||||
|
||||
* glib/Object.cs:
|
||||
|
|
|
@ -35,15 +35,17 @@ namespace GtkSharp.Generation {
|
|||
|
||||
public ManagedCallString (Parameters parms, bool drop_first)
|
||||
{
|
||||
bool has_cb = false;
|
||||
for (int i = drop_first ? 1 : 0; i < parms.Count; i ++) {
|
||||
Parameter p = parms [i];
|
||||
if (p.IsLength && i > 0 && parms [i-1].IsString)
|
||||
continue;
|
||||
else if (p.Scope == "notified") {
|
||||
has_cb = true;
|
||||
user_data_param = parms[i+1].Name;
|
||||
destroy_param = parms[i+2].Name;
|
||||
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;
|
||||
continue;
|
||||
} else if (p is ErrorParameter) {
|
||||
|
@ -54,9 +56,10 @@ namespace GtkSharp.Generation {
|
|||
|
||||
if (p.PassAs != String.Empty && (p.Name != p.FromNative (p.Name)))
|
||||
this.special.Add (true);
|
||||
else if (p.Generatable is CallbackGen)
|
||||
else if (p.Generatable is CallbackGen) {
|
||||
has_cb = true;
|
||||
this.special.Add (true);
|
||||
else
|
||||
} else
|
||||
this.special.Add (false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue