[perl-glib] Add a few integer casts to quell compiler warnings



commit d369e4034b5872d8d819e44e58ae027cf25eea0a
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Aug 25 18:40:46 2018 +0200

    Add a few integer casts to quell compiler warnings

 GKeyFile.xs | 10 +++++-----
 GObject.xs  |  4 ++--
 GType.xs    |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/GKeyFile.xs b/GKeyFile.xs
index debf2b3..c7333e8 100644
--- a/GKeyFile.xs
+++ b/GKeyFile.xs
@@ -289,7 +289,7 @@ g_key_file_get_groups (key_file)
     PPCODE:
        groups = g_key_file_get_groups (key_file, &len);
        if (len != 0) {
-               EXTEND(SP, len);
+               EXTEND(SP, (long) len);
                for (i = 0; i < len; i++)
                        PUSHs (sv_2mortal (newSVGChar (groups[i])));
        }
@@ -637,7 +637,7 @@ g_key_file_get_string_list (key_file, group_name, key)
                                        &retlen,
                                        &err);
                        CROAK_ON_GERROR (err);
-                       EXTEND (sp, retlen);
+                       EXTEND (sp, (long) retlen);
                        for (i = 0; i < retlen; i++)
                                PUSHs (sv_2mortal (newSVGChar (retlist[i])));
                        g_strfreev (retlist);
@@ -651,7 +651,7 @@ g_key_file_get_string_list (key_file, group_name, key)
                                        &retlen,
                                        &err);
                        CROAK_ON_GERROR (err);
-                       EXTEND (sp, retlen);
+                       EXTEND (sp, (long) retlen);
                        for (i = 0; i < retlen; i++)
                                PUSHs (sv_2mortal (boolSV (retlist[i])));
                        g_free (retlist);
@@ -665,7 +665,7 @@ g_key_file_get_string_list (key_file, group_name, key)
                                        &retlen,
                                        &err);
                        CROAK_ON_GERROR (err);
-                       EXTEND (sp, retlen);
+                       EXTEND (sp, (long) retlen);
                        for (i = 0; i < retlen; i++)
                                PUSHs (sv_2mortal (newSViv (retlist[i])));
                        g_free (retlist);
@@ -694,7 +694,7 @@ g_key_file_get_double_list (key_file, group_name, key)
                        &err);
        if (err)
                gperl_croak_gerror (NULL, err);
-       EXTEND (sp, retlen);
+       EXTEND (sp, (long) retlen);
        for (i = 0; i < retlen; i++)
                PUSHs (sv_2mortal (newSVnv (retlist[i])));
        g_free (retlist);
diff --git a/GObject.xs b/GObject.xs
index fba49d2..1123e47 100644
--- a/GObject.xs
+++ b/GObject.xs
@@ -1608,7 +1608,7 @@ g_object_find_property (object_or_class_name, ...)
                        warn ("list_properties: %d properties\n", n_props);
 #endif
                        if (n_props) {
-                               EXTEND (SP, n_props);
+                               EXTEND (SP, (int) n_props);
 
                                for (i = 0; i < n_props; i++)
                                        PUSHs (sv_2mortal (newSVGParamSpec (props[i])));
@@ -1642,7 +1642,7 @@ g_object_find_property (object_or_class_name, ...)
                        warn ("list_properties: %d properties\n", n_props);
 #endif
                        if (n_props) {
-                               EXTEND (SP, n_props);
+                               EXTEND (SP, (int) n_props);
 
                                for (i = 0; i < n_props; i++)
                                        PUSHs (sv_2mortal (newSVGParamSpec (props[i])));
diff --git a/GType.xs b/GType.xs
index 1a687ae..2e145b5 100644
--- a/GType.xs
+++ b/GType.xs
@@ -2654,7 +2654,7 @@ list_signals (class, package)
        sigids = g_signal_list_ids (package_type, &num);
        if (!num)
                XSRETURN_EMPTY;
-       EXTEND(SP, num);
+       EXTEND(SP, (int) num);
        for (i = 0; i < num; i++) {
                g_signal_query (sigids[i], &siginfo);
                PUSHs (sv_2mortal (newSVGSignalQuery (&siginfo)));


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