[vala] Support nullable error types in VAPI files
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Support nullable error types in VAPI files
- Date: Thu, 18 Feb 2010 22:03:18 +0000 (UTC)
commit 8cfa1ac483108240ee119605ebd2bb96301d8e8f
Author: Jürg Billeter <j bitron ch>
Date: Thu Feb 18 23:02:27 2010 +0100
Support nullable error types in VAPI files
vala/valaerrortype.vala | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/vala/valaerrortype.vala b/vala/valaerrortype.vala
index d0992e8..a21a323 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 () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]