]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Call ref_sink on Object.new_valist/new_with_properties if needed
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Aug 2018 12:19:06 +0000 (14:19 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Aug 2018 12:19:06 +0000 (14:19 +0200)
codegen/valagobjectmodule.vala

index 11aa6e686a23a37d35390b431fdc758e5a06c4d2..ad808a138fff4c850f09acb0963bc2e3b4ad3bc1 100644 (file)
@@ -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);