[perl-Glib] Hush some compiler warnings



commit 2b86c7a17ebe2f90dce03ace40341cd09c670d32
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Wed Dec 4 21:59:23 2013 +0100

    Hush some compiler warnings

 GObject.xs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/GObject.xs b/GObject.xs
index 53ee0cc..0a1277d 100644
--- a/GObject.xs
+++ b/GObject.xs
@@ -287,7 +287,7 @@ class_info_finish_loading (ClassInfo * class_info)
                                        av_push (new_isa,
                                                 newSVpv (package, 0));
                                else
-                                       warn ("interface type %s(%d) is not"
+                                       warn ("interface type %s(%"G_GSIZE_FORMAT") is not"
                                              " registered",
                                              g_type_name (interfaces[i]),
                                              interfaces[i]);
@@ -1123,7 +1123,7 @@ _inc_ref_and_count (GObject * key, gint value, gpointer user_data)
 {
        PERL_UNUSED_VAR (user_data);
        g_object_ref (key);
-       g_hash_table_replace (perl_gobjects, key, (gpointer)++value);
+       g_hash_table_replace (perl_gobjects, key, GINT_TO_POINTER (++value));
 }
 #endif
 
@@ -1251,13 +1251,13 @@ DESTROY (SV *sv)
        {
                gint count;
                G_LOCK (perl_gobjects);
-               count = (int)g_hash_table_lookup (perl_gobjects, object);
+               count = GPOINTER_TO_INT (g_hash_table_lookup (perl_gobjects, object));
                count--;
                if (count > 0)
                {
 /*g_printerr ("decing: %p - %d\n", object, count);*/
                        g_hash_table_replace (perl_gobjects, object,
-                                             (gpointer)count);
+                                             GINT_TO_POINTER (count));
                }
                else
                {


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