summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2020-12-23 00:43:26 +0900
committerKenta Murata <mrkn@mrkn.jp>2020-12-23 09:24:55 +0900
commit01ab29cc285ec92c07cd67db6f8616690bd217f8 (patch)
tree24db23d86f456cdf75c0b893593b60b6be894c29 /include
parentdb0385d6576bb9d2486e799c935e6b1fa1e7dfcc (diff)
[memory_view] Make some rb_memroy_view_t members const
Diffstat (limited to 'include')
-rw-r--r--include/ruby/memory_view.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ruby/memory_view.h b/include/ruby/memory_view.h
index 6ff5cbf070..b5e82650b4 100644
--- a/include/ruby/memory_view.h
+++ b/include/ruby/memory_view.h
@@ -80,7 +80,7 @@ typedef struct {
* item structure. rb_memory_view_prepare_item_desc and
* rb_memory_view_get_item allocate this memory if needed,
* and rb_memory_view_release frees it. */
- rb_memory_view_item_component_t *components;
+ const rb_memory_view_item_component_t *components;
/* The number of components in an item. */
size_t length;
@@ -91,15 +91,15 @@ typedef struct {
/* ndim size array indicating the number of elements in each dimension.
* This can be NULL when ndim == 1. */
- ssize_t *shape;
+ const ssize_t *shape;
/* ndim size array indicating the number of bytes to skip to go to the
* next element in each dimension. */
- ssize_t *strides;
+ const ssize_t *strides;
/* The offset in each dimension when this memory view exposes a nested array.
* Or, NULL when this memory view exposes a flat array. */
- ssize_t *sub_offsets;
+ const ssize_t *sub_offsets;
/* the private data for managing this exported memory */
void *const private;