From: Jürg Billeter Date: Sun, 16 Aug 2009 10:23:40 +0000 (+0200) Subject: Replace in_creation_method field by property X-Git-Tag: 0.7.6~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f35206fb339c3ed428c4b6c3a107c8a625fe6ad5;p=thirdparty%2Fvala.git Replace in_creation_method field by property --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index aceec9a60..0cfdb307b 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -127,7 +127,7 @@ internal class Vala.CCodeBaseModule : CCodeModule { Gee.Set reserved_identifiers; public int next_temp_var_id = 0; - public bool in_creation_method = false; + public bool in_creation_method { get { return current_method is CreationMethod; } } public bool in_constructor = false; public bool in_static_or_class_ctor = false; public bool current_method_inner_error = false; diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala index 93150df80..b9cdc1c30 100644 --- a/codegen/valaccodemethodmodule.vala +++ b/codegen/valaccodemethodmodule.vala @@ -185,7 +185,6 @@ internal class Vala.CCodeMethodModule : CCodeStructModule { public override void visit_method (Method m) { var old_symbol = current_symbol; bool old_method_inner_error = current_method_inner_error; - bool old_in_creation_method = in_creation_method; int old_next_temp_var_id = next_temp_var_id; var old_temp_vars = temp_vars; var old_temp_ref_vars = temp_ref_vars; @@ -205,7 +204,6 @@ internal class Vala.CCodeMethodModule : CCodeStructModule { check_type (m.return_type); if (m is CreationMethod) { - in_creation_method = true; var cl = current_type_symbol as Class; if (cl != null && !cl.is_compact) { if (cl.base_class == null) { @@ -214,8 +212,6 @@ internal class Vala.CCodeMethodModule : CCodeStructModule { in_gobject_creation_method = true; } } - } else { - in_creation_method = false; } var creturn_type = current_return_type; @@ -290,8 +286,6 @@ internal class Vala.CCodeMethodModule : CCodeStructModule { m.body.ccodenode = cblock; } - - in_creation_method = old_in_creation_method; } bool inner_error = current_method_inner_error;