imcontext: Make size arguments be gsize and not int
authorBenjamin Otte <otte@redhat.com>
Wed, 13 Jun 2018 19:40:38 +0000 (21:40 +0200)
committerMohammed Sadiq <sadiq@sadiqpk.org>
Thu, 14 Jun 2018 01:07:00 +0000 (06:37 +0530)
commiteefd2d6f104973d1461feee0b94dff8af991e145
treeceaa7521adc4deb452705db6bc8385125e979437
parentdaf72e2e964b05b5c6ddeaa1f43a0966fd2ec98c
imcontext: Make size arguments be gsize and not int

Otherwise gcc complains when we use these as arguments to g_new() on
32bit architectures with:

../gtk/gtkcomposetable.c: In function ‘gtk_compose_table_list_add_array’:
/usr/include/glib-2.0/glib/gmem.h:217:10: warning: argument 1 range [21474836484294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
      __p = g_##func##_n (__n, __s);   \
      ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmem.h:279:42: note: in expansion of macro ‘_G_NEW’
 #define g_new0(struct_type, n_structs)   _G_NEW (struct_type, n_structs, malloc0)
                                          ^~~~~~
../gtk/gtkcomposetable.c:851:22: note: in expansion of macro ‘g_new0’
   gtk_compose_seqs = g_new0 (guint16, length);
                      ^~~~~~
/usr/include/glib-2.0/glib/gmem.h:96:10: note: in a call to allocation function ‘g_malloc0_n’ declared here
 gpointer g_malloc0_n      (gsize  n_blocks,
          ^~~~~~~~~~~
gtk/gtkcomposetable.c
gtk/gtkcomposetable.h
gtk/gtkimcontextsimple.c
gtk/gtkimcontextsimple.h