class Fisk::Helpers::JITBuffer
Attributes
memory[R]
pos[R]
Public Class Methods
new(memory)
click to toggle source
# File lib/fisk/helpers.rb, line 54 def initialize memory @memory = memory @pos = 0 end
Public Instance Methods
putc(byte)
click to toggle source
# File lib/fisk/helpers.rb, line 59 def putc byte @memory[@pos] = byte @pos += 1 end
seek(pos, whence = IO::SEEK_SET)
click to toggle source
# File lib/fisk/helpers.rb, line 64 def seek pos, whence = IO::SEEK_SET raise NotImplementedError if whence != IO::SEEK_SET @pos = pos self end
to_function(params, ret)
click to toggle source
# File lib/fisk/helpers.rb, line 71 def to_function params, ret Fiddle::Function.new memory.to_i, params, ret end