Project

General

Profile

Actions

Feature #17831

closed

add slice method to Fiddle::MemoryView

Added by dsisnero (Dominic Sisneros) over 3 years ago. Updated over 3 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
[ruby-core:103603]

Description

# Fiddle::MemoryView#slice(start, length)
# Fiddle::MemoryView#slice(range)
mv = Fiddle::MemoryView.new(memory_object)

while mv
  puts mv[0]
  mv = mv.slice(1..-1) # returns a new MemoryView object with the same MemoryView#obj   # that is no copying
end

related to #17832
related to #17851
related to #17833


Related issues 1 (1 open0 closed)

Related to Ruby master - Feature #17851: ruby extension for memoryviewOpenActions
Actions #1

Updated by Eregon (Benoit Daloze) over 3 years ago

Actions #2

Updated by dsisnero (Dominic Sisneros) over 3 years ago

  • Description updated (diff)
Actions #3

Updated by dsisnero (Dominic Sisneros) over 3 years ago

  • Description updated (diff)

Updated by kou (Kouhei Sutou) over 3 years ago

  • Status changed from Open to Third Party's Issue

Could you file this to https://github.com/ruby/fiddle/ ?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0