]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Don't apply ref_sink_function if target_type is floating_reference 6f1d0947bed9260436e7d2da18977b3925cdb0bd
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Apr 2018 11:08:23 +0000 (13:08 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Apr 2018 11:08:23 +0000 (13:08 +0200)
codegen/valaccodebasemodule.vala

index 3055e45c944f9439ca6f6e7bf556cee6df9829da..6f775e0520ac6880531a84c46673fc6a02985a69 100644 (file)
@@ -5723,6 +5723,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                var result = ((GLibValue) value).copy ();
 
                if (type.value_owned
+                   && target_type is ObjectType && !target_type.floating_reference
                    && type.floating_reference) {
                        /* floating reference, sink it.
                         */