[vala] Do not declare private symbols in internal header
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Do not declare private symbols in internal header
- Date: Wed, 16 Sep 2009 11:53:26 +0000 (UTC)
commit 54eaec24156b9c8a313f5002fffdf3bebc0596ac
Author: Jürg Billeter <j bitron ch>
Date: Wed Sep 16 12:17:43 2009 +0200
Do not declare private symbols in internal header
codegen/valaccodebasemodule.vala | 16 ++++++++++++----
codegen/valaccodedelegatemodule.vala | 4 +++-
codegen/valaccodemethodmodule.vala | 4 +++-
codegen/valaccodestructmodule.vala | 4 +++-
codegen/valagerrormodule.vala | 4 +++-
codegen/valagtypemodule.vala | 4 +++-
6 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 3c0ef09..9f5611d 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -737,7 +737,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
if (!en.is_internal_symbol ()) {
generate_enum_declaration (en, header_declarations);
}
- generate_enum_declaration (en, internal_header_declarations);
+ if (!en.is_private_symbol ()) {
+ generate_enum_declaration (en, internal_header_declarations);
+ }
if (!en.has_type_id) {
return;
@@ -875,7 +877,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
if (!c.is_internal_symbol ()) {
generate_constant_declaration (c, header_declarations);
}
- generate_constant_declaration (c, internal_header_declarations);
+ if (!c.is_private_symbol ()) {
+ generate_constant_declaration (c, internal_header_declarations);
+ }
}
public void generate_field_declaration (Field f, CCodeDeclarationSpace decl_space) {
@@ -1020,7 +1024,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
if (!f.is_internal_symbol ()) {
generate_field_declaration (f, header_declarations);
}
- generate_field_declaration (f, internal_header_declarations);
+ if (!f.is_private_symbol ()) {
+ generate_field_declaration (f, internal_header_declarations);
+ }
lhs = new CCodeIdentifier (f.get_cname ());
@@ -1338,7 +1344,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
|| acc.access == SymbolAccessibility.PROTECTED)) {
generate_property_accessor_declaration (acc, header_declarations);
}
- generate_property_accessor_declaration (acc, internal_header_declarations);
+ if (!prop.is_private_symbol () && acc.access != SymbolAccessibility.PRIVATE) {
+ generate_property_accessor_declaration (acc, internal_header_declarations);
+ }
}
}
diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala
index 3ff9666..c148d8a 100644
--- a/codegen/valaccodedelegatemodule.vala
+++ b/codegen/valaccodedelegatemodule.vala
@@ -114,7 +114,9 @@ internal class Vala.CCodeDelegateModule : CCodeArrayModule {
if (!d.is_internal_symbol ()) {
generate_delegate_declaration (d, header_declarations);
}
- generate_delegate_declaration (d, internal_header_declarations);
+ if (!d.is_private_symbol ()) {
+ generate_delegate_declaration (d, internal_header_declarations);
+ }
}
public override string get_delegate_target_cname (string delegate_cname) {
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 670a2a9..3125e74 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -332,7 +332,9 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
if (!m.is_internal_symbol ()) {
generate_method_declaration (m, header_declarations);
}
- generate_method_declaration (m, internal_header_declarations);
+ if (!m.is_private_symbol ()) {
+ generate_method_declaration (m, internal_header_declarations);
+ }
}
function = new CCodeFunction (m.get_real_cname ());
diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala
index d8f5d4d..c1d9f4a 100644
--- a/codegen/valaccodestructmodule.vala
+++ b/codegen/valaccodestructmodule.vala
@@ -146,7 +146,9 @@ internal class Vala.CCodeStructModule : CCodeBaseModule {
if (!st.is_internal_symbol ()) {
generate_struct_declaration (st, header_declarations);
}
- generate_struct_declaration (st, internal_header_declarations);
+ if (!st.is_private_symbol ()) {
+ generate_struct_declaration (st, internal_header_declarations);
+ }
st.accept_children (codegen);
diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala
index 2ab64a0..ff08984 100644
--- a/codegen/valagerrormodule.vala
+++ b/codegen/valagerrormodule.vala
@@ -67,7 +67,9 @@ internal class Vala.GErrorModule : CCodeDelegateModule {
if (!edomain.is_internal_symbol ()) {
generate_error_domain_declaration (edomain, header_declarations);
}
- generate_error_domain_declaration (edomain, internal_header_declarations);
+ if (!edomain.is_private_symbol ()) {
+ generate_error_domain_declaration (edomain, internal_header_declarations);
+ }
string quark_fun_name = edomain.get_lower_case_cprefix () + "quark";
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index f2a28bd..75912b5 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -491,7 +491,9 @@ internal class Vala.GTypeModule : GErrorModule {
if (!cl.is_internal_symbol ()) {
generate_class_struct_declaration (cl, header_declarations);
}
- generate_class_struct_declaration (cl, internal_header_declarations);
+ if (!cl.is_private_symbol ()) {
+ generate_class_struct_declaration (cl, internal_header_declarations);
+ }
cl.accept_children (codegen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]