diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-21 11:14:49 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-03-21 11:14:49 +0100 |
commit | 736c5f33673759b22ec19698e47619f2e49592e6 (patch) | |
tree | 1b50a69c74cf4a412e72c21a6daceadf31a61d27 /codegen/valaclassregisterfunction.vala | |
parent | 9f5d3a7a9b56417eaa4489c5616da9e18583bb8f (diff) | |
download | vala-736c5f33673759b22ec19698e47619f2e49592e6.tar.gz |
codegen: Minor refactoring of TypeRegisterFunction and its subclasses
Diffstat (limited to 'codegen/valaclassregisterfunction.vala')
-rw-r--r-- | codegen/valaclassregisterfunction.vala | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/codegen/valaclassregisterfunction.vala b/codegen/valaclassregisterfunction.vala index e1433d2dd..e9490e3be 100644 --- a/codegen/valaclassregisterfunction.vala +++ b/codegen/valaclassregisterfunction.vala @@ -29,7 +29,11 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { /** * Specifies the class to be registered. */ - public weak Class class_reference { get; set; } + public weak Class class_reference { + get { + return (Class) type_symbol; + } + } /** * Creates a new C function to register the specified class at runtime. @@ -38,11 +42,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { * @return newly created class register function */ public ClassRegisterFunction (Class cl) { - class_reference = cl; - } - - public override TypeSymbol get_type_declaration () { - return class_reference; + base (cl); } public override string get_type_struct_name () { @@ -101,10 +101,6 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { } } - public override SymbolAccessibility get_accessibility () { - return class_reference.access; - } - public override string? get_gtype_value_table_init_function_name () { bool is_fundamental = !class_reference.is_compact && class_reference.base_class == null; if ( is_fundamental ) |