3 Ruby.primitive :allocate_bytes
4 raise PrimitiveFailure, "primitive failed"
9 Rubinius.asm(obj) do |obj|
12 send_with_block :initialize, 0, true
18 def fetch_bytes(start, count)
19 Ruby.primitive :fetch_bytes
20 raise PrimitiveFailure, "primitive failed"
23 def move_bytes(start, count, offset)
24 Ruby.primitive :move_bytes
25 raise ArgumentError, "move_bytes failed!"
29 Ruby.primitive :get_byte
30 raise PrimitiveFailure, "primitive failed"
33 def set_byte(index, value)
34 Ruby.primitive :set_byte
35 raise PrimitiveFailure, "primitive failed"
38 def compare_bytes(other, a, b)
39 Ruby.primitive :compare_bytes
40 raise PrimitiveFailure, "primitive failed"
44 Ruby.primitive :bytearray_size
45 raise PrimitiveFailure, "primitive failed"
49 Ruby.primitive :bytes_dup_into
50 raise PrimitiveFailure, "primitive failed"
55 obj = cls.new(self.size)