module Gogyou::Extensions::FFI::AbstractMemory

Public Instance Methods

bytesize() click to toggle source
# File lib/gogyou/ffi.rb, line 14
def bytesize
  size
end
byteslice(index, size) click to toggle source
# File lib/gogyou/ffi.rb, line 31
def byteslice(index, size)
  get_bytes(index, size)
end
getbyte(o) click to toggle source
# File lib/gogyou/ffi.rb, line 39
def getbyte(o)
  get_uint8(o)
end
setbinary(index, mem, offset = 0, size = mem.bytesize - offset) click to toggle source
# File lib/gogyou/ffi.rb, line 18
def setbinary(index, mem, offset = 0, size = mem.bytesize - offset)
  offset = offset.to_i
  size = size.to_i
  size1 = mem.bytesize - offset
  size = size1 if size > size1

  if size > 0
    put_bytes(index, mem.byteslice(offset, size))
  end

  self
end
setbyte(o, n) click to toggle source
# File lib/gogyou/ffi.rb, line 35
def setbyte(o, n)
  set_uint8(o, n)
end
to_address() click to toggle source
# File lib/gogyou/ffi.rb, line 8
def to_address
  to_i
end
Also aliased as: to_ptr
to_ptr()
Alias for: to_address