diff --git a/ChangeLog b/ChangeLog index 59134364a..bb78fcfbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-22 Dan Winship + + * 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 * bootstrap-generic: New script, handles bootstrapping stuff generically diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index a211b19ef..4e667b7d4 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -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 ""; } }