Blob Blame History Raw
commit 0a284e3d2b0b8a8e1671d1333155456d4bb27fca
Author: Kouhei Sutou <kou@clear-code.com>
Date:   Wed May 4 16:25:23 2016 +0900

    gi: fix a bug that int32[] returns wrong values
    
    GitHub: fix #758
    
    Reported by Mamoru TASAKA. Thanks!!!

diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c b/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
index 319df93..69da8fb 100644
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-argument.c
@@ -191,7 +191,7 @@ array_c_to_ruby_sized(gconstpointer *elements,
     case GI_TYPE_TAG_INT32:
         g_base_info_unref(element_type_info);
         {
-            const gint8 *numbers = (const gint8 *)elements;
+            const gint32 *numbers = (const gint32 *)elements;
             for (i = 0; i < n_elements; i++) {
                 rb_ary_push(rb_array, INT2NUM(numbers[i]));
             }