This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libglib-perl.

commit 5cece030118e2aacb772c98a258b1aaa2cbf1c8e
Author: Torsten Schönfeld <kaffeeti...@gmx.de>
Date:   Tue Sep 22 22:09:56 2015 +0200

    Fix compilation on libglib < 2.26
    
    It didn't have g_variant_is_floating yet.
---
 GVariant.xs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/GVariant.xs b/GVariant.xs
index 733ec7a..697422e 100644
--- a/GVariant.xs
+++ b/GVariant.xs
@@ -40,10 +40,15 @@ variant_to_sv (GVariant * variant, gboolean own)
        if (own) {
 #if GLIB_CHECK_VERSION (2, 30, 0)
                g_variant_take_ref (variant);
-#else
+#elif GLIB_CHECK_VERSION (2, 26, 0)
                if (g_variant_is_floating (variant)) {
                        g_variant_ref_sink (variant);
                }
+#else
+               /* In this case, we have no way of finding out whether the
+                * variant has a floating ref, so we just always ref_sink even
+                * if this might cause a leak in some cases. */
+               g_variant_ref_sink (variant);
 #endif
        } else {
                g_variant_ref (variant);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libglib-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to