Subject: Re: [ruby-ffi] FFI check & questions |
From: Matijs van Zuijlen |
Date: 2/27/12 10:14 AM |
To: ruby-ffi@googlegroups.com |
I am in the process of looking at using the following library from ruby
(http://www.datalogics.com/products/pdf2img/) using FFI but have run into a few
issues mainly due to my lack of FFI experience and general lack of C++.
[...]
The following Gist has the example C++ code (Posted with permission) and my Ruby
code along side some example output. https://gist.github.com/1920005
[...]
On line 22 of the ruby file I have defined the second argument as an :int, this
is probably wrong but it suffices for the moment I think. I assume the real
value is an Enumeration, struct or something along those lines. It is not
documented so I will ask the original developers.
Questions:
1. On line 40 of the ruby file the required memory is apparently 4Gb, this is
obviously wrong, does anyone know why? (I assume I have messed something up
somewhere)
2. Can anyone see any other obvious mistakes on my part?