diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-07-13 19:50:22 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-07-13 20:05:10 +0200 |
commit | a96983dbe6079ff7c174d5dc536d35eb4b2d4bd4 (patch) | |
tree | 5c73f8670a90ac134629f0551590be16d6971850 /codegen/valatyperegisterfunction.vala | |
parent | ca34aa621160558164e4be18726da89958a7dcd1 (diff) | |
download | vala-a96983dbe6079ff7c174d5dc536d35eb4b2d4bd4.tar.gz |
codegen: Move interface_init calls before g_type_add_instance_private()
Diffstat (limited to 'codegen/valatyperegisterfunction.vala')
-rw-r--r-- | codegen/valatyperegisterfunction.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala index c1811d949..cb0db6844 100644 --- a/codegen/valatyperegisterfunction.vala +++ b/codegen/valatyperegisterfunction.vala @@ -213,6 +213,10 @@ public abstract class Vala.TypeRegisterFunction { type_init.add_statement (new CCodeExpressionStatement (add_class_private_call)); } + if (!declaration_only) { + get_type_interface_init_statements (context, type_init, plugin); + } + if (cl != null && (cl.has_private_fields || cl.get_type_parameters ().size > 0)) { var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_type_add_instance_private")); ccall.add_argument (new CCodeIdentifier (type_id_name)); @@ -220,10 +224,6 @@ public abstract class Vala.TypeRegisterFunction { type_init.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeIdentifier ("%s_private_offset".printf (get_ccode_name (cl))), ccall))); } - if (!declaration_only) { - get_type_interface_init_statements (context, type_init, plugin); - } - if (!plugin) { CCodeExpression condition; // the condition that guards the type initialisation if (use_thread_safe) { |