summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorKenta Murata <mrkn@users.noreply.github.com>2020-10-02 08:04:25 +0900
committerGitHub <noreply@github.com>2020-10-02 08:04:25 +0900
commitc827cacde155c7b0a2d5e632c983cb38049f68e2 (patch)
tree63299614ca9ebcdaf4584380c37d6c8e52fb97ed /ext/-test-
parent8dd9a2369331f594de8b8541faf90c461813eb77 (diff)
memory_view.c: Use ssize_t for ndim in memory_view (#3615)
* memory_view.c: Use ssize_t for ndim in memory_view * include/ruby/memory_view.h: Fix the type of item_size argument
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/memory_view/memory_view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/-test-/memory_view/memory_view.c b/ext/-test-/memory_view/memory_view.c
index 116f4ce5e31..ba7cbd9825b 100644
--- a/ext/-test-/memory_view/memory_view.c
+++ b/ext/-test-/memory_view/memory_view.c
@@ -185,7 +185,7 @@ memory_view_get_memory_view_info(VALUE mod, VALUE obj)
static VALUE
memory_view_fill_contiguous_strides(VALUE mod, VALUE ndim_v, VALUE item_size_v, VALUE shape_v, VALUE row_major_p)
{
- int i, ndim = FIX2INT(ndim_v);
+ ssize_t i, ndim = NUM2SSIZET(ndim_v);
Check_Type(shape_v, T_ARRAY);
ssize_t *shape = ALLOC_N(ssize_t, ndim);