* generator/CallbackGen.cs (Validate, MarshalType): if validation

fails, set MarshalType to "" to propagate that failure into
	methods that have args of this type. [Fixes #75851]

svn path=/trunk/gtk-sharp/; revision=48679
This commit is contained in:
Dan Winship 2005-08-22 16:51:38 +00:00
parent 792093dc32
commit b0f83bc0ad
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2005-08-22 Dan Winship <danw@novell.com>
* generator/CallbackGen.cs (Validate, MarshalType): if validation
fails, set MarshalType to "" to propagate that failure into
methods that have args of this type. [Fixes #75851]
2005-08-15 Peter Williams <peter@newton.cx>
* bootstrap-generic: New script, handles bootstrapping stuff generically

View file

@ -31,6 +31,7 @@ namespace GtkSharp.Generation {
private Signature sig = null;
private ImportSignature isig = null;
private ReturnValue retval;
private bool valid = true;
public CallbackGen (XmlElement ns, XmlElement elem) : base (ns, elem)
{
@ -44,21 +45,27 @@ namespace GtkSharp.Generation {
if (!retval.Validate ()) {
Console.WriteLine ("rettype: " + retval.CType + " in callback " + CName);
Statistics.ThrottledCount++;
valid = false;
return false;
}
if (!parms.Validate ()) {
Console.WriteLine (" in callback " + CName);
Statistics.ThrottledCount++;
valid = false;
return false;
}
valid = true;
return true;
}
public override string MarshalType {
get {
return NS + "Sharp." + Name + "Native";
if (valid)
return NS + "Sharp." + Name + "Native";
else
return "";
}
}