[FFI] FFI::Pointer.size is not defined #607

Burgestrand opened this Issue Mar 27, 2013 · 0 comments


None yet

1 participant


The Ruby FFI gem defines FFI::Pointer.size, JRuby FFI does not.

The size method is nice to have in case you ever subclass FFI::AutoPointer, and then want to create a memory pointer from that, which needs the size:

ptr = Class.new(FFI::AutoPointer) do
  def self.release(pointer)
    # something clever

  # Fix:
  # def self.size
  #   FFI.type_size(:pointer)
  # end
FFI::MemoryPointer.new(ptr) # raises error on jruby, since size is missing
@ghost ghost was assigned Mar 27, 2013
@ghost Unknown added a commit that closed this issue Mar 27, 2013
Wayne Meissner Add FFI::Pointer.size to fix #607 8390e59
@ghost ghost closed this in 8390e59 Mar 27, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment