mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
memory_view.c: Rename private to private_data for C++ (#4812)
* memory_view.c: Rename private to private_data for C++ * doc/memory_view.md: Update document * Fix doc/memory_view.md Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
This commit is contained in:
parent
a5e323f5ed
commit
f8bb2d9b27
Notes:
git
2021-09-06 16:02:13 +09:00
Merged-By: mrkn <mrkn@ruby-lang.org>
3 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ The MemoryView structure consists of the following members.
|
|||
A `ndim` size array consisting of the offsets in each dimension when the MemoryView exposes a nested array.
|
||||
This can be `NULL` when the MemoryView exposes a flat array.
|
||||
|
||||
- `void *const private`
|
||||
- `void *private_data`
|
||||
|
||||
The private data that MemoryView provider uses internally.
|
||||
This can be `NULL` when any private data is unnecessary.
|
||||
|
|
|
@ -100,7 +100,7 @@ typedef struct {
|
|||
const ssize_t *sub_offsets;
|
||||
|
||||
/* the private data for managing this exported memory */
|
||||
void *const private;
|
||||
void *private_data;
|
||||
} rb_memory_view_t;
|
||||
|
||||
typedef bool (* rb_memory_view_get_func_t)(VALUE obj, rb_memory_view_t *view, int flags);
|
||||
|
|
|
@ -210,7 +210,7 @@ rb_memory_view_init_as_byte_array(rb_memory_view_t *view, VALUE obj, void *data,
|
|||
view->shape = NULL;
|
||||
view->strides = NULL;
|
||||
view->sub_offsets = NULL;
|
||||
*((void **)&view->private) = NULL;
|
||||
view->private_data = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue