[vala] Error domain declaration fixes
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] Error domain declaration fixes
- Date: Thu, 2 Apr 2009 14:37:56 -0400 (EDT)
commit c32cc313ba708295df18e5caa5006795c22d2be3
Author: Jürg Billeter <j bitron ch>
Date: Thu Apr 2 20:37:23 2009 +0200
Error domain declaration fixes
---
gobject/valagerrormodule.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/gobject/valagerrormodule.vala b/gobject/valagerrormodule.vala
index 5d1201c..7869130 100644
--- a/gobject/valagerrormodule.vala
+++ b/gobject/valagerrormodule.vala
@@ -66,6 +66,11 @@ internal class Vala.GErrorModule : CCodeDelegateModule {
public override void visit_error_domain (ErrorDomain edomain) {
generate_error_domain_declaration (edomain, source_declarations);
+ if (!edomain.is_internal_symbol ()) {
+ generate_error_domain_declaration (edomain, header_declarations);
+ }
+ generate_error_domain_declaration (edomain, internal_header_declarations);
+
string quark_fun_name = edomain.get_lower_case_cprefix () + "quark";
var cquark_fun = new CCodeFunction (quark_fun_name, gquark_type.data_type.get_cname ());
@@ -300,6 +305,11 @@ internal class Vala.GErrorModule : CCodeDelegateModule {
current_method_inner_error = true;
+ var error_type = (ErrorType) clause.error_type;
+ if (error_type.error_domain != null) {
+ generate_error_domain_declaration (error_type.error_domain, source_declarations);
+ }
+
clause.accept_children (codegen);
var cfrag = new CCodeFragment ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]