Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[FFI] FFI::Pointer.size is not defined #607
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 end # Fix: # def self.size # FFI.type_size(:pointer) # end end FFI::MemoryPointer.new(ptr) # raises error on jruby, since size is missing