Commit 6accf66c authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

rename MemberAccessibility to SymbolAccessibility and move its declaration

2007-08-30  Juerg Billeter  <j@bitron.ch>

	* vala/valamemberaccessibility.vala: rename MemberAccessibility to
	  SymbolAccessibility and move its declaration to vala/valasymbol.vala
	* vala/parser.y: store accessibility modifier for properties and follow
	  the renames caused by the accessibility releated refactoring, cast
	  the Struct allocated in struct_declaration to silence gcc
	* vala/Makefile.am: remove valamemberaccessibility.* files
	* vala/valasymbol.vala: add access property found in serveral
	  sub-classes and add is_internal_symbol () method, which considers
	  parent symbols to determinate if a symbol belongs to internal API
	* gobject/*, vala/*, vapigen/valagidlparser.vala:
	  move the access property/field found in several Symbol derived
	  classes to the Symbol class where it belongs and rename the
	  MemberAccessibility enumeration to SymbolAccessibility

	* vala/valaformalparameter.vala, vala/valanamespace.vala: set access
	  to public on initialization, as there is no accessibility modifier
	* gobject/valacodegenerator.vala: do not add internal symbols to
	  header_type_member_declarations
	* vala/valasemanticanalyzer.vala: do not add HEADER_SHALLOW symbol
	  dependencies for internal symbols
	* gobject/valacodegeneratormethod.vala: consider all anchestors,
	  not just the parent for visibility

	patch by Mathias Hasselmann, fixes bug 471475

svn path=/trunk/; revision=546
parent dafce8e1
2007-08-30 Jürg Billeter <j@bitron.ch>
* vala/valamemberaccessibility.vala: rename MemberAccessibility to
SymbolAccessibility and move its declaration to vala/valasymbol.vala
* vala/parser.y: store accessibility modifier for properties and follow
the renames caused by the accessibility releated refactoring, cast
the Struct allocated in struct_declaration to silence gcc
* vala/Makefile.am: remove valamemberaccessibility.* files
* vala/valasymbol.vala: add access property found in serveral
sub-classes and add is_internal_symbol () method, which considers
parent symbols to determinate if a symbol belongs to internal API
* gobject/*, vala/*, vapigen/valagidlparser.vala:
move the access property/field found in several Symbol derived
classes to the Symbol class where it belongs and rename the
MemberAccessibility enumeration to SymbolAccessibility
* vala/valaformalparameter.vala, vala/valanamespace.vala: set access
to public on initialization, as there is no accessibility modifier
* gobject/valacodegenerator.vala: do not add internal symbols to
header_type_member_declarations
* vala/valasemanticanalyzer.vala: do not add HEADER_SHALLOW symbol
dependencies for internal symbols
* gobject/valacodegeneratormethod.vala: consider all anchestors,
not just the parent for visibility
patch by Mathias Hasselmann, fixes bug 471475
2007-08-30 Jürg Billeter <j@bitron.ch> 2007-08-30 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, vala/valainterfacewriter.vala, * vala/valaclass.vala, vala/valainterfacewriter.vala,
......
...@@ -77,7 +77,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { ...@@ -77,7 +77,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
} }
} }
public override MemberAccessibility get_accessibility () { public override SymbolAccessibility get_accessibility () {
return class_reference.access; return class_reference.access;
} }
......
...@@ -345,7 +345,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -345,7 +345,7 @@ public class Vala.CodeGenerator : CodeVisitor {
var ctypedef = new CCodeTypeDefinition (cb.return_type.get_cname (), cfundecl); var ctypedef = new CCodeTypeDefinition (cb.return_type.get_cname (), cfundecl);
if (cb.access != MemberAccessibility.PRIVATE) { if (!cb.is_internal_symbol ()) {
header_type_definition.append (ctypedef); header_type_definition.append (ctypedef);
} else { } else {
source_type_member_declaration.append (ctypedef); source_type_member_declaration.append (ctypedef);
...@@ -395,7 +395,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -395,7 +395,7 @@ public class Vala.CodeGenerator : CodeVisitor {
cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("%s%s".printf (c.get_cname (), arr), (CCodeExpression) c.initializer.ccodenode)); cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("%s%s".printf (c.get_cname (), arr), (CCodeExpression) c.initializer.ccodenode));
cdecl.modifiers = CCodeModifiers.STATIC; cdecl.modifiers = CCodeModifiers.STATIC;
if (c.access != MemberAccessibility.PRIVATE) { if (!c.is_internal_symbol ()) {
header_type_member_declaration.append (cdecl); header_type_member_declaration.append (cdecl);
} else { } else {
source_type_member_declaration.append (cdecl); source_type_member_declaration.append (cdecl);
...@@ -409,7 +409,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -409,7 +409,7 @@ public class Vala.CodeGenerator : CodeVisitor {
CCodeExpression lhs = null; CCodeExpression lhs = null;
CCodeStruct st = null; CCodeStruct st = null;
if (f.access != MemberAccessibility.PRIVATE) { if (f.access != SymbolAccessibility.PRIVATE) {
st = instance_struct; st = instance_struct;
if (f.instance) { if (f.instance) {
lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), f.get_cname ()); lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), f.get_cname ());
...@@ -432,7 +432,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -432,7 +432,7 @@ public class Vala.CodeGenerator : CodeVisitor {
lhs = new CCodeIdentifier (f.get_cname ()); lhs = new CCodeIdentifier (f.get_cname ());
} }
} else if (f.access == MemberAccessibility.PRIVATE) { } else if (f.access == SymbolAccessibility.PRIVATE) {
if (f.instance) { if (f.instance) {
st = instance_priv_struct; st = instance_priv_struct;
lhs = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), f.get_cname ()); lhs = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), f.get_cname ());
...@@ -567,7 +567,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -567,7 +567,7 @@ public class Vala.CodeGenerator : CodeVisitor {
function.add_parameter (cvalueparam); function.add_parameter (cvalueparam);
} }
if (t.access != MemberAccessibility.PRIVATE) { if (!prop.is_internal_symbol ()) {
header_type_member_declaration.append (function.copy ()); header_type_member_declaration.append (function.copy ());
} else { } else {
function.modifiers |= CCodeModifiers.STATIC; function.modifiers |= CCodeModifiers.STATIC;
...@@ -639,7 +639,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -639,7 +639,7 @@ public class Vala.CodeGenerator : CodeVisitor {
} }
if (!is_virtual) { if (!is_virtual) {
if (t.access != MemberAccessibility.PRIVATE) { if (!prop.is_internal_symbol ()) {
header_type_member_declaration.append (function.copy ()); header_type_member_declaration.append (function.copy ());
} else { } else {
function.modifiers |= CCodeModifiers.STATIC; function.modifiers |= CCodeModifiers.STATIC;
...@@ -2102,7 +2102,7 @@ public class Vala.CodeGenerator : CodeVisitor { ...@@ -2102,7 +2102,7 @@ public class Vala.CodeGenerator : CodeVisitor {
typed_inst = pub_inst; typed_inst = pub_inst;
} }
CCodeExpression inst; CCodeExpression inst;
if (field.access == MemberAccessibility.PRIVATE) { if (field.access == SymbolAccessibility.PRIVATE) {
inst = new CCodeMemberAccess.pointer (typed_inst, "priv"); inst = new CCodeMemberAccess.pointer (typed_inst, "priv");
} else { } else {
inst = typed_inst; inst = typed_inst;
......
...@@ -62,7 +62,7 @@ public class Vala.CodeGenerator { ...@@ -62,7 +62,7 @@ public class Vala.CodeGenerator {
CCodeFragment decl_frag; CCodeFragment decl_frag;
CCodeFragment def_frag; CCodeFragment def_frag;
if (cl.access != MemberAccessibility.PRIVATE) { if (cl.access != SymbolAccessibility.PRIVATE) {
decl_frag = header_type_declaration; decl_frag = header_type_declaration;
def_frag = header_type_definition; def_frag = header_type_definition;
} else { } else {
...@@ -148,7 +148,7 @@ public class Vala.CodeGenerator { ...@@ -148,7 +148,7 @@ public class Vala.CodeGenerator {
var type_fun = new ClassRegisterFunction (cl); var type_fun = new ClassRegisterFunction (cl);
type_fun.init_from_type (in_plugin); type_fun.init_from_type (in_plugin);
if (cl.access != MemberAccessibility.PRIVATE) { if (cl.access != SymbolAccessibility.PRIVATE) {
header_type_member_declaration.append (type_fun.get_declaration ()); header_type_member_declaration.append (type_fun.get_declaration ());
} else { } else {
source_type_member_declaration.append (type_fun.get_declaration ()); source_type_member_declaration.append (type_fun.get_declaration ());
...@@ -163,7 +163,7 @@ public class Vala.CodeGenerator { ...@@ -163,7 +163,7 @@ public class Vala.CodeGenerator {
} }
} else if (cl.default_construction_method != null) { } else if (cl.default_construction_method != null) {
var function = new CCodeFunction (cl.get_lower_case_cprefix () + "free", "void"); var function = new CCodeFunction (cl.get_lower_case_cprefix () + "free", "void");
if (cl.access == MemberAccessibility.PRIVATE) { if (cl.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC; function.modifiers = CCodeModifiers.STATIC;
} }
......
...@@ -36,7 +36,7 @@ public class Vala.CodeGenerator { ...@@ -36,7 +36,7 @@ public class Vala.CodeGenerator {
CCodeFragment decl_frag; CCodeFragment decl_frag;
CCodeFragment def_frag; CCodeFragment def_frag;
if (iface.access != MemberAccessibility.PRIVATE) { if (iface.access != SymbolAccessibility.PRIVATE) {
decl_frag = header_type_declaration; decl_frag = header_type_declaration;
def_frag = header_type_definition; def_frag = header_type_definition;
} else { } else {
...@@ -82,7 +82,7 @@ public class Vala.CodeGenerator { ...@@ -82,7 +82,7 @@ public class Vala.CodeGenerator {
var type_fun = new InterfaceRegisterFunction (iface); var type_fun = new InterfaceRegisterFunction (iface);
type_fun.init_from_type (); type_fun.init_from_type ();
if (iface.access != MemberAccessibility.PRIVATE) { if (iface.access != SymbolAccessibility.PRIVATE) {
header_type_member_declaration.append (type_fun.get_declaration ()); header_type_member_declaration.append (type_fun.get_declaration ());
} else { } else {
source_type_member_declaration.append (type_fun.get_declaration ()); source_type_member_declaration.append (type_fun.get_declaration ());
......
...@@ -69,7 +69,7 @@ public class Vala.CodeGenerator { ...@@ -69,7 +69,7 @@ public class Vala.CodeGenerator {
typed_inst = pub_inst; typed_inst = pub_inst;
} }
CCodeExpression inst; CCodeExpression inst;
if (f.access == MemberAccessibility.PRIVATE) { if (f.access == SymbolAccessibility.PRIVATE) {
inst = new CCodeMemberAccess.pointer (typed_inst, "priv"); inst = new CCodeMemberAccess.pointer (typed_inst, "priv");
} else { } else {
inst = typed_inst; inst = typed_inst;
......
...@@ -185,11 +185,7 @@ public class Vala.CodeGenerator { ...@@ -185,11 +185,7 @@ public class Vala.CodeGenerator {
} }
} }
bool visible = m.access != MemberAccessibility.PRIVATE; bool visible = !m.is_internal_symbol ();
if (m.parent_symbol is DataType) {
var dt = (DataType) m.parent_symbol;
visible = visible && dt.access != MemberAccessibility.PRIVATE;
}
/* real function declaration and definition not needed /* real function declaration and definition not needed
* for abstract methods */ * for abstract methods */
......
...@@ -34,7 +34,7 @@ public class Vala.CodeGenerator { ...@@ -34,7 +34,7 @@ public class Vala.CodeGenerator {
CCodeFragment decl_frag; CCodeFragment decl_frag;
CCodeFragment def_frag; CCodeFragment def_frag;
if (st.access != MemberAccessibility.PRIVATE) { if (st.access != SymbolAccessibility.PRIVATE) {
decl_frag = header_type_declaration; decl_frag = header_type_declaration;
def_frag = header_type_definition; def_frag = header_type_definition;
} else { } else {
...@@ -55,7 +55,7 @@ public class Vala.CodeGenerator { ...@@ -55,7 +55,7 @@ public class Vala.CodeGenerator {
if (st.default_construction_method != null) { if (st.default_construction_method != null) {
var function = new CCodeFunction (st.get_lower_case_cprefix () + "free", "void"); var function = new CCodeFunction (st.get_lower_case_cprefix () + "free", "void");
if (st.access == MemberAccessibility.PRIVATE) { if (st.access == SymbolAccessibility.PRIVATE) {
function.modifiers = CCodeModifiers.STATIC; function.modifiers = CCodeModifiers.STATIC;
} }
......
...@@ -67,7 +67,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { ...@@ -67,7 +67,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider {
var m = new Method ("get_object", ret_type, ma.source_reference); var m = new Method ("get_object", ret_type, ma.source_reference);
m.set_cname ("dbus_g_proxy_new_for_name"); m.set_cname ("dbus_g_proxy_new_for_name");
m.add_cheader_filename ("dbus/dbus-glib.h"); m.add_cheader_filename ("dbus/dbus-glib.h");
m.access = MemberAccessibility.PUBLIC; m.access = SymbolAccessibility.PUBLIC;
var string_type_ref = new TypeReference (); var string_type_ref = new TypeReference ();
string_type_ref.data_type = string_type; string_type_ref.data_type = string_type;
m.add_parameter (new FormalParameter ("name", string_type_ref)); m.add_parameter (new FormalParameter ("name", string_type_ref));
...@@ -88,7 +88,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { ...@@ -88,7 +88,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider {
error_type.data_type = dbus_error_type; error_type.data_type = dbus_error_type;
m.add_error_domain (error_type); m.add_error_domain (error_type);
} }
m.access = MemberAccessibility.PUBLIC; m.access = SymbolAccessibility.PUBLIC;
m.add_parameter (new FormalParameter.with_ellipsis ()); m.add_parameter (new FormalParameter.with_ellipsis ());
symbols.add (m); symbols.add (m);
return m; return m;
...@@ -98,7 +98,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { ...@@ -98,7 +98,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider {
return null; return null;
} }
var s = new DBusSignal (ma.member_name, new TypeReference (), ma.source_reference); var s = new DBusSignal (ma.member_name, new TypeReference (), ma.source_reference);
s.access = MemberAccessibility.PUBLIC; s.access = SymbolAccessibility.PUBLIC;
symbols.add (s); symbols.add (s);
return s; return s;
} }
......
...@@ -64,7 +64,7 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction { ...@@ -64,7 +64,7 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction {
return "G_TYPE_INTERFACE"; return "G_TYPE_INTERFACE";
} }
public override MemberAccessibility get_accessibility () { public override SymbolAccessibility get_accessibility () {
return interface_reference.access; return interface_reference.access;
} }
......
...@@ -50,7 +50,7 @@ public abstract class Vala.TypeRegisterFunction : Object { ...@@ -50,7 +50,7 @@ public abstract class Vala.TypeRegisterFunction : Object {
if (!plugin) { if (!plugin) {
fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType"); fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType");
/* Function will not be prototyped anyway */ /* Function will not be prototyped anyway */
if (get_accessibility () == MemberAccessibility.PRIVATE) { if (get_accessibility () == SymbolAccessibility.PRIVATE) {
fun.modifiers = CCodeModifiers.STATIC; fun.modifiers = CCodeModifiers.STATIC;
} }
} else { } else {
...@@ -58,7 +58,7 @@ public abstract class Vala.TypeRegisterFunction : Object { ...@@ -58,7 +58,7 @@ public abstract class Vala.TypeRegisterFunction : Object {
fun.add_parameter (new CCodeFormalParameter ("module", "GTypeModule *")); fun.add_parameter (new CCodeFormalParameter ("module", "GTypeModule *"));
var get_fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType"); var get_fun = new CCodeFunction ("%s_get_type".printf (get_type_declaration ().get_lower_case_cname (null)), "GType");
if (get_accessibility () == MemberAccessibility.PRIVATE) { if (get_accessibility () == SymbolAccessibility.PRIVATE) {
fun.modifiers = CCodeModifiers.STATIC; fun.modifiers = CCodeModifiers.STATIC;
} }
...@@ -206,5 +206,5 @@ public abstract class Vala.TypeRegisterFunction : Object { ...@@ -206,5 +206,5 @@ public abstract class Vala.TypeRegisterFunction : Object {
/** /**
* Returns the accessibility for this type. * Returns the accessibility for this type.
*/ */
public abstract MemberAccessibility get_accessibility (); public abstract SymbolAccessibility get_accessibility ();
} }
...@@ -191,9 +191,6 @@ libvalacore_la_SOURCES = \ ...@@ -191,9 +191,6 @@ libvalacore_la_SOURCES = \
valamemberaccess.c \ valamemberaccess.c \
valamemberaccess.h \ valamemberaccess.h \
valamemberaccess.vala \ valamemberaccess.vala \
valamemberaccessibility.c \
valamemberaccessibility.h \
valamemberaccessibility.vala \
valamemorymanager.c \ valamemorymanager.c \
valamemorymanager.h \ valamemorymanager.h \
valamemorymanager.vala \ valamemorymanager.vala \
...@@ -384,7 +381,6 @@ valainclude_HEADERS = \ ...@@ -384,7 +381,6 @@ valainclude_HEADERS = \
valalockstatement.h \ valalockstatement.h \
valamember.h \ valamember.h \
valamemberaccess.h \ valamemberaccess.h \
valamemberaccessibility.h \
valamemorymanager.h \ valamemorymanager.h \
valamethod.h \ valamethod.h \
valanamedargument.h \ valanamedargument.h \
......
...@@ -2436,7 +2436,7 @@ class_declaration ...@@ -2436,7 +2436,7 @@ class_declaration
VALA_CODE_NODE (current_symbol)->attributes = $2; VALA_CODE_NODE (current_symbol)->attributes = $2;
if ($3 != 0) { if ($3 != 0) {
VALA_DATA_TYPE (current_symbol)->access = $3; vala_symbol_set_access (VALA_SYMBOL (current_symbol), $3);
} }
if (($4 & VALA_MODIFIER_ABSTRACT) == VALA_MODIFIER_ABSTRACT) { if (($4 & VALA_MODIFIER_ABSTRACT) == VALA_MODIFIER_ABSTRACT) {
vala_class_set_is_abstract (VALA_CLASS (current_symbol), TRUE); vala_class_set_is_abstract (VALA_CLASS (current_symbol), TRUE);
...@@ -2482,15 +2482,15 @@ opt_access_modifier ...@@ -2482,15 +2482,15 @@ opt_access_modifier
access_modifier access_modifier
: PUBLIC : PUBLIC
{ {
$$ = VALA_MEMBER_ACCESSIBILITY_PUBLIC; $$ = VALA_SYMBOL_ACCESSIBILITY_PUBLIC;
} }
| PROTECTED | PROTECTED
{ {
$$ = VALA_MEMBER_ACCESSIBILITY_PROTECTED; $$ = VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
} }
| PRIVATE | PRIVATE
{ {
$$ = VALA_MEMBER_ACCESSIBILITY_PRIVATE; $$ = VALA_SYMBOL_ACCESSIBILITY_PRIVATE;
} }
; ;
...@@ -2644,7 +2644,7 @@ constant_declaration ...@@ -2644,7 +2644,7 @@ constant_declaration
g_object_unref ($5); g_object_unref ($5);
g_object_unref ($6); g_object_unref ($6);
if ($3 != 0) { if ($3 != 0) {
$$->access = $3; vala_symbol_set_access (VALA_SYMBOL ($$), $3);
} }
} }
; ;
...@@ -2666,7 +2666,7 @@ field_declaration ...@@ -2666,7 +2666,7 @@ field_declaration
$$ = vala_field_new (vala_symbol_get_name (VALA_SYMBOL ($6)), $5, vala_variable_declarator_get_initializer ($6), src); $$ = vala_field_new (vala_symbol_get_name (VALA_SYMBOL ($6)), $5, vala_variable_declarator_get_initializer ($6), src);
g_object_unref (src); g_object_unref (src);
if ($3 != 0) { if ($3 != 0) {
$$->access = $3; vala_symbol_set_access (VALA_SYMBOL ($$), $3);
} }
if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) { if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) {
vala_field_set_instance ($$, FALSE); vala_field_set_instance ($$, FALSE);
...@@ -2811,7 +2811,7 @@ method_header ...@@ -2811,7 +2811,7 @@ method_header
$$ = vala_method_new ($6, $5, src); $$ = vala_method_new ($6, $5, src);
g_object_unref (src); g_object_unref (src);
if ($3 != 0) { if ($3 != 0) {
$$->access = $3; vala_symbol_set_access (VALA_SYMBOL ($$), $3);
} }
if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) { if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) {
vala_method_set_instance ($$, FALSE); vala_method_set_instance ($$, FALSE);
...@@ -2860,7 +2860,7 @@ method_header ...@@ -2860,7 +2860,7 @@ method_header
g_object_unref (src); g_object_unref (src);
vala_method_set_instance ($$, FALSE); vala_method_set_instance ($$, FALSE);
if ($3 != 0) { if ($3 != 0) {
$$->access = $3; vala_symbol_set_access (VALA_SYMBOL ($$), $3);
} }
VALA_CODE_NODE($$)->attributes = $2; VALA_CODE_NODE($$)->attributes = $2;
...@@ -2993,6 +2993,8 @@ property_declaration ...@@ -2993,6 +2993,8 @@ property_declaration
VALA_CODE_NODE($$)->attributes = $2; VALA_CODE_NODE($$)->attributes = $2;
vala_symbol_set_access (VALA_SYMBOL ($$), $3);
g_object_unref ($5); g_object_unref ($5);
g_free ($6); g_free ($6);
g_object_unref ($8); g_object_unref ($8);
...@@ -3024,6 +3026,8 @@ property_declaration ...@@ -3024,6 +3026,8 @@ property_declaration
VALA_CODE_NODE($$)->attributes = $2; VALA_CODE_NODE($$)->attributes = $2;
vala_symbol_set_access (VALA_SYMBOL ($$), $3);
g_object_unref ($5); g_object_unref ($5);
g_free ($6); g_free ($6);
g_object_unref ($8); g_object_unref ($8);
...@@ -3120,7 +3124,7 @@ signal_declaration ...@@ -3120,7 +3124,7 @@ signal_declaration
$$ = vala_signal_new ($6, $5, src); $$ = vala_signal_new ($6, $5, src);
g_object_unref (src); g_object_unref (src);
if ($3 != 0) { if ($3 != 0) {
vala_signal_set_access ($$, $3); vala_symbol_set_access (VALA_SYMBOL ($$), $3);
} }
VALA_CODE_NODE($$)->attributes = $2; VALA_CODE_NODE($$)->attributes = $2;
...@@ -3201,7 +3205,7 @@ struct_declaration ...@@ -3201,7 +3205,7 @@ struct_declaration
// merge class declarations // merge class declarations
} }
} else { } else {
current_symbol = vala_struct_new (name, src); current_symbol = VALA_SYMBOL (vala_struct_new (name, src));
g_free (name); g_free (name);
g_object_unref (src); g_object_unref (src);
...@@ -3219,7 +3223,7 @@ struct_declaration ...@@ -3219,7 +3223,7 @@ struct_declaration
} }
VALA_CODE_NODE(current_symbol)->attributes = $2; VALA_CODE_NODE(current_symbol)->attributes = $2;
if ($3 != 0) { if ($3 != 0) {
VALA_DATA_TYPE(current_symbol)->access = $3; vala_symbol_set_access (VALA_SYMBOL (current_symbol), $3);
} }
if ($8 != NULL) { if ($8 != NULL) {
for (l = $8; l != NULL; l = l->next) { for (l = $8; l != NULL; l = l->next) {
...@@ -3314,7 +3318,7 @@ interface_declaration ...@@ -3314,7 +3318,7 @@ interface_declaration
VALA_CODE_NODE (iface)->attributes = $2; VALA_CODE_NODE (iface)->attributes = $2;
if ($3 != 0) { if ($3 != 0) {
VALA_DATA_TYPE (iface)->access = $3; vala_symbol_set_access (VALA_SYMBOL (iface), $3);
} }
if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) { if (($4 & VALA_MODIFIER_STATIC) == VALA_MODIFIER_STATIC) {
vala_interface_set_is_static (iface, TRUE); vala_interface_set_is_static (iface, TRUE);
...@@ -3442,7 +3446,7 @@ enum_declaration ...@@ -3442,7 +3446,7 @@ enum_declaration
VALA_CODE_NODE (en)->attributes = $2; VALA_CODE_NODE (en)->attributes = $2;
if ($3 != 0) { if ($3 != 0) {
VALA_DATA_TYPE (en)->access = $3; vala_symbol_set_access (VALA_SYMBOL (en), $3);
} }
push_symbol (VALA_SYMBOL (en)); push_symbol (VALA_SYMBOL (en));
...@@ -3549,7 +3553,7 @@ callback_declaration ...@@ -3549,7 +3553,7 @@ callback_declaration
g_object_unref (parent_symbol); g_object_unref (parent_symbol);
if ($3 != 0) { if ($3 != 0) {
VALA_DATA_TYPE (cb)->access = $3; vala_symbol_set_access (VALA_SYMBOL (cb), $3);
} }
VALA_CODE_NODE (cb)->attributes = $2; VALA_CODE_NODE (cb)->attributes = $2;
......
...@@ -155,7 +155,7 @@ public class Vala.Array : DataType { ...@@ -155,7 +155,7 @@ public class Vala.Array : DataType {
if (length_field == null) { if (length_field == null) {
length_field = new ArrayLengthField (source_reference); length_field = new ArrayLengthField (source_reference);
length_field.access = MemberAccessibility.PUBLIC; length_field.access = SymbolAccessibility.PUBLIC;
var root_symbol = source_reference.file.context.root; var root_symbol = source_reference.file.context.root;
length_field.type_reference = new TypeReference (); length_field.type_reference = new TypeReference ();
...@@ -170,7 +170,7 @@ public class Vala.Array : DataType { ...@@ -170,7 +170,7 @@ public class Vala.Array : DataType {
resize_method = new ArrayResizeMethod (source_reference); resize_method = new ArrayResizeMethod (source_reference);
<