[vala/staging] codegen: Call ref_sink on Object.new_valist/new_with_properties if needed



commit 746530b8343c1c00d38507236b8bfab12da13c94
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Aug 17 14:19:06 2018 +0200

    codegen: Call ref_sink on Object.new_valist/new_with_properties if needed

 codegen/valagobjectmodule.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 11aa6e686..ad808a138 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -757,7 +757,8 @@ public class Vala.GObjectModule : GTypeModule {
 
                        var ma = expr.call as MemberAccess;
                        if (ma.inner != null && ma.inner.symbol_reference == gobject_type &&
-                           (ma.member_name == "new" || ma.member_name == "newv")) {
+                           (ma.member_name == "new" || ma.member_name == "newv"
+                            || ma.member_name == "new_valist" || ma.member_name == "new_with_properties")) {
                                // Object.new (...) creation
                                // runtime check to ref_sink the instance if it's a floating type
                                base.visit_method_call (expr);


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