[vala] Add factory method for creating instance register functions
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] Add factory method for creating instance register functions
- Date: Tue, 28 Jul 2009 18:30:54 +0000 (UTC)
commit 7171477e01f0a88866e501bf65c0e4ea8574e95e
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Thu Apr 30 15:32:49 2009 +0200
Add factory method for creating instance register functions
Signed-off-by: Didier 'Ptitjes <ptitjes free fr>
codegen/valagtypemodule.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index 18c44fd..e534cfe 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -1791,7 +1791,7 @@ internal class Vala.GTypeModule : GErrorModule {
}
decl_space.add_type_definition (type_struct);
- var type_fun = new InterfaceRegisterFunction (iface, context);
+ var type_fun = create_interface_register_function (iface);
type_fun.init_from_type ();
decl_space.add_type_member_declaration (type_fun.get_declaration ());
}
@@ -1812,13 +1812,17 @@ internal class Vala.GTypeModule : GErrorModule {
add_interface_base_init_function (iface);
- var type_fun = new InterfaceRegisterFunction (iface, context);
+ var type_fun = create_interface_register_function (iface);
type_fun.init_from_type ();
source_type_member_definition.append (type_fun.get_definition ());
current_type_symbol = null;
}
+ public virtual TypeRegisterFunction create_interface_register_function (Interface iface) {
+ return new InterfaceRegisterFunction (iface, context);
+ }
+
private void add_interface_base_init_function (Interface iface) {
var base_init = new CCodeFunction ("%s_base_init".printf (iface.get_lower_case_cname (null)), "void");
base_init.add_parameter (new CCodeFormalParameter ("iface", "%sIface *".printf (iface.get_cname ())));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]