From: Jürg Billeter Date: Thu, 18 Feb 2010 22:02:27 +0000 (+0100) Subject: Support nullable error types in VAPI files X-Git-Tag: 0.8.0~260 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8cfa1ac483108240ee119605ebd2bb96301d8e8f;p=thirdparty%2Fvala.git Support nullable error types in VAPI files --- diff --git a/vala/valaerrortype.vala b/vala/valaerrortype.vala index d0992e85c..a21a323a3 100644 --- a/vala/valaerrortype.vala +++ b/vala/valaerrortype.vala @@ -1,6 +1,6 @@ /* valaerrortype.vala * - * Copyright (C) 2008 Jürg Billeter + * Copyright (C) 2008-2010 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -77,11 +77,19 @@ public class Vala.ErrorType : ReferenceType { } public override string to_qualified_string (Scope? scope) { + string result; + if (error_domain == null) { - return "GLib.Error"; + result = "GLib.Error"; } else { - return error_domain.get_full_name (); + result = error_domain.get_full_name (); + } + + if (nullable) { + result += "?"; } + + return result; } public override DataType copy () {