[vala/emit-let: 3/5] codegen: Drop useless comma expression in GObject module
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/emit-let: 3/5] codegen: Drop useless comma expression in GObject module
- Date: Thu, 3 Mar 2011 18:57:05 +0000 (UTC)
commit 3fe96427f9a3aaa07f4da1619e642a891ccedcc3
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Mar 3 18:57:12 2011 +0100
codegen: Drop useless comma expression in GObject module
codegen/valagobjectmodule.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 34db16c..89432e9 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -747,18 +747,16 @@ public class Vala.GObjectModule : GTypeModule {
// runtime check to ref_sink the instance if it's a floating type
base.visit_method_call (expr);
- var ccomma = new CCodeCommaExpression ();
var temp_var = get_temp_variable (expr.value_type, false, expr, false);
emit_temp_var (temp_var);
- ccomma.append_expression (new CCodeAssignment (get_variable_cexpression (temp_var.name), get_cvalue (expr)));
+ ccode.add_assignment (get_variable_cexpression (temp_var.name), get_cvalue (expr));
var initiallyunowned_ccall = new CCodeFunctionCall (new CCodeIdentifier ("G_IS_INITIALLY_UNOWNED"));
initiallyunowned_ccall.add_argument (get_variable_cexpression (temp_var.name));
var sink_ref_ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_ref_sink"));
sink_ref_ccall.add_argument (get_variable_cexpression (temp_var.name));
- ccomma.append_expression (new CCodeConditionalExpression (initiallyunowned_ccall, sink_ref_ccall, get_variable_cexpression (temp_var.name)));
- set_cvalue (expr, ccomma);
+ set_cvalue (expr, new CCodeConditionalExpression (initiallyunowned_ccall, sink_ref_ccall, get_variable_cexpression (temp_var.name)));
return;
} else if (ma.symbol_reference == gobject_type) {
// Object (...) chain up
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]