Commit 54eaec24 authored by Jürg Billeter's avatar Jürg Billeter

Do not declare private symbols in internal header

parent c6930f6d
......@@ -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);
}
}
}
......
......@@ -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) {
......
......@@ -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 ());
......
......@@ -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);
......
......@@ -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";
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment