summaryrefslogtreecommitdiff
path: root/include/ruby/memory_view.h
AgeCommit message (Collapse)Author
2023-09-09memory_view: Avoid using bit fieldSutou Kouhei
Bit field's memory layout is implementation-defined. See also: https://wiki.sei.cmu.edu/confluence/display/c/EXP11-C.+Do+not+make+assumptions+regarding+the+layout+of+structures+with+bit-fields If memory layout is implementation-defined, it's difficult to use from FFI library such as Ruby-FFI. Notes: Merged: https://github.com/ruby/ruby/pull/8380
2022-10-26Fix -Wundef warningsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6634
2021-11-08memory_view.c: Add _memory_view_entry member in rb_memory_view_t (#5088)Kenta Murata
Notes: Merged-By: mrkn <[email protected]>
2021-09-10include/ruby/memory_view.h: add doxygen卜部昌平
I'm just applying doc/memory_view.md as a doxygen comment. [ci skip] Notes: Merged: https://github.com/ruby/ruby/pull/4815
2021-09-06memory_view.c: Rename private to private_data for C++ (#4812)Kenta Murata
* 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 <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Notes: Merged-By: mrkn <[email protected]>
2020-12-25[memory_view] Fix a commentKenta Murata
A consumer of a MemoryView no longer guards the original object. [ci skip]
2020-12-24[memory_view] Fix some grammar issues in a commentKenta Murata
2020-12-23[memory_view] Make some rb_memroy_view_t members constKenta Murata
2020-12-23[memory_view][fiddle] Rename len to byte_size in rb_memory_view_tKenta Murata
2020-12-23[memory_view][fiddle] Use bool for boolean return valueKenta Murata
2020-12-10include/ruby/memory_view.h: fix the return type of ↵Kenta Murata
rb_memory_view_prepare_item_desc
2020-12-10include/ruby/memory_view.h: fix typoKenta Murata
2020-12-10memory_view.c: Add rb_memory_view_get_item and ↵Kenta Murata
rb_memory_view_prepare_item_desc (#3871) Notes: Merged-By: mrkn <[email protected]>
2020-12-08memory_view.c: Add rb_memory_view_extract_item_members (#3855)Kenta Murata
Notes: Merged-By: mrkn <[email protected]>
2020-12-07Revert "memory_view.c: Add rb_memory_view_extract_item_members"Kenta Murata
This reverts the following three commits. - ce707079c153f389d861c91a8dccc510fab0e245 - 1a76bb56b0ba99a19d1373c4c8ebac42e7b6f27c - 51500eedefa492699668ced3e07e330a9a4d53ee
2020-12-06memory_view.c: Fix the argument type of rb_memory_view_extract_item_membersKenta Murata
2020-12-06memory_view.c: Add rb_memory_view_extract_item_membersKenta Murata
2020-11-30Keep references of memory-view-exported objects (#3816)Kenta Murata
* memory_view.c: remove a reference in view->obj at rb_memory_view_release * memory_view.c: keep references of memory-view-exported objects * Update common.mk * memory_view.c: Use st_update Notes: Merged-By: mrkn <[email protected]>
2020-10-06include/ruby/memory_view.h: annotate functions卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3631
2020-10-06rb_memory_view_is_contiguous: convert into an inline function卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3631
2020-10-06memory_view.h: use bool卜部昌平
Because `bool` is already used in the header there is no reason to hesitate. Notes: Merged: https://github.com/ruby/ruby/pull/3631
2020-10-02memory_view.c: Use ssize_t for ndim in memory_view (#3615)Kenta Murata
* memory_view.c: Use ssize_t for ndim in memory_view * include/ruby/memory_view.h: Fix the type of item_size argument Notes: Merged-By: mrkn <[email protected]>
2020-09-25memory_view.h: brush up the description in the commentKenta Murata
2020-09-25Buffer protocol proposal (#3261)Kenta Murata
* Add buffer protocol * Modify for some review comments * Per-object buffer availability * Rename to MemoryView from Buffer and make compilable * Support integral repeat count in memory view format * Support 'x' for padding bytes * Add rb_memory_view_parse_item_format * Check type in rb_memory_view_register * Update dependencies in common.mk * Add test of MemoryView * Add test of rb_memory_view_init_as_byte_array * Add native size format test * Add MemoryView test utilities * Add test of rb_memory_view_fill_contiguous_strides * Skip spaces in format string * Support endianness specifiers * Update documentation * Support alignment * Use RUBY_ALIGNOF * Fix format parser to follow the pack format * Support the _ modifier * Parse count specifiers in get_format_size function. * Use STRUCT_ALIGNOF * Fix test * Fix test * Fix total size for the case with tail padding * Fix rb_memory_view_get_item_pointer * Fix rb_memory_view_parse_item_format again Notes: Merged-By: mrkn <[email protected]>