[vala/0.10] Fix ref_sink of Gtk.Window created with GLib.Object.new



commit 10ab3f633ed8b90bc4dbb1709fd0d8c624a05bfd
Author: Luca Bruno <lethalman88 gmail com>
Date:   Fri Aug 20 09:39:23 2010 +0200

    Fix ref_sink of Gtk.Window created with GLib.Object.new
    
    Fixes bug 618750.

 codegen/valagobjectmodule.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 59ef5ee..d295289 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -792,11 +792,11 @@ public class Vala.GObjectModule : GTypeModule {
 				temp_vars.add (temp_var);
 				ccomma.append_expression (new CCodeAssignment (get_variable_cexpression (temp_var.name), (CCodeExpression) expr.ccodenode));
 
-				var is_floating_ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_is_floating"));
-				is_floating_ccall.add_argument (get_variable_cexpression (temp_var.name));
+				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 (is_floating_ccall, sink_ref_ccall, get_variable_cexpression (temp_var.name)));
+				ccomma.append_expression (new CCodeConditionalExpression (initiallyunowned_ccall, sink_ref_ccall, get_variable_cexpression (temp_var.name)));
 
 				expr.ccodenode = ccomma;
 				return;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]