[vala] Replace in_creation_method field by property
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Replace in_creation_method field by property
- Date: Sun, 16 Aug 2009 10:29:17 +0000 (UTC)
commit f35206fb339c3ed428c4b6c3a107c8a625fe6ad5
Author: Jürg Billeter <j bitron ch>
Date: Sun Aug 16 12:23:40 2009 +0200
Replace in_creation_method field by property
codegen/valaccodebasemodule.vala | 2 +-
codegen/valaccodemethodmodule.vala | 6 ------
2 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index aceec9a..0cfdb30 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -127,7 +127,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
Gee.Set<string> 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 93150df..b9cdc1c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]