summaryrefslogtreecommitdiff
path: root/memory_view.c
AgeCommit message (Collapse)Author
2020-10-06STRUCT_ALIGNOF: use RUBY_ALIGNOF卜部昌平
This was a workaround for RUBY_ALIGNOF's glitch, which has already been fixed. See also https://github.com/ruby/ruby/pull/3570 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 <mrkn@ruby-lang.org>
2020-09-25memory_view.c: prevent "warning: instance variable __memory_view__ not ↵Kenta Murata
initialized"
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 <mrkn@ruby-lang.org>