Subject:
[ruby-ffi] Problem with a double** array
From:
mael
Date:
1/5/10 4:55 AM
To:
ruby-ffi

Hello, I'm trying to initialize a double** array the following way:

nrows = 100
ncols = 100
data = FFI::MemoryPointer.new :pointer, nrows
(0..nrows-1).each do |i|
  row_i = FFI::MemoryPointer.new :double, ncols
  data.put_pointer i, row_i
end

but now when I do data.get_pointer(0).size I get weird results (like
2147483647 )