From b0f83bc0adcfc15f9ee5428366aa6417576d28e9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 22 Aug 2005 16:51:38 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ generator/CallbackGen.cs | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 ""; } }