ext/cairo/rb_cairo_context.c in cairo-1.16.2 vs ext/cairo/rb_cairo_context.c in cairo-1.16.3
- old
+ new
@@ -3,11 +3,11 @@
* Ruby Cairo Binding
*
* $Author: kou $
* $Date: 2008-09-26 13:52:08 $
*
- * Copyright 2005-2018 Kouhei Sutou <kou@cozmixng.org>
+ * Copyright 2005-2019 Kouhei Sutou <kou@cozmixng.org>
* Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
* Copyright 2004-2005 MenTaLguY <mental@rydia.com>
*
* This file is made available under the same terms as Ruby
*
@@ -349,11 +349,11 @@
n = rb_scan_args (argc, argv, "12", &red, &green, &blue);
if (n == 1 && rb_cairo__is_kind_of (red, rb_cArray))
{
VALUE ary = red;
- n = RARRAY_LEN (ary);
+ n = (int) RARRAY_LEN (ary);
red = rb_ary_entry (ary, 0);
green = rb_ary_entry (ary, 1);
blue = rb_ary_entry (ary, 2);
}
@@ -386,11 +386,11 @@
n = rb_scan_args (argc, argv, "13", &red, &green, &blue, &alpha);
if (n == 1 && rb_cairo__is_kind_of (red, rb_cArray))
{
VALUE ary = red;
- n = RARRAY_LEN (ary);
+ n = (int) RARRAY_LEN (ary);
red = rb_ary_entry (ary, 0);
green = rb_ary_entry (ary, 1);
blue = rb_ary_entry (ary, 2);
alpha = rb_ary_entry (ary, 3);
}
@@ -565,11 +565,11 @@
}
else
{
int i, length;
double *values;
- length = RARRAY_LEN (dash_array);
+ length = (int) RARRAY_LEN (dash_array);
values = ALLOCA_N (double, length);
if (!values)
{
rb_cairo_check_status (CAIRO_STATUS_NO_MEMORY);
}
@@ -1321,10 +1321,10 @@
int num_clusters = 0;
cairo_text_cluster_flags_t cluster_flags;
cr = _SELF;
utf8 = RSTRING_PTR (rb_utf8);
- utf8_len = RSTRING_LEN (rb_utf8);
+ utf8_len = (int) RSTRING_LEN (rb_utf8);
rb_cairo__glyphs_from_ruby_object (rb_glyphs, &glyphs, &num_glyphs);
rb_cairo__text_clusters_from_ruby_object (rb_clusters,
&clusters, &num_clusters);
cluster_flags = RVAL2CRTEXTCLUSTERFLAGS (rb_cluster_flags);
cairo_show_text_glyphs (cr, utf8, utf8_len,