Subject:
Re: [ruby-ffi] Is there any way we can use string type as return parameter?
From:
Jesús García Sáez <blaxter@gmail.com>
Date:
3/30/10 1:40 AM
To:
ruby-ffi@googlegroups.com

On Tue, Mar 30, 2010 at 06:45, Wayne Meissner <wmeissner@gmail.com> wrote:
>
> On 30 March 2010 05:20, Evan Phoenix <evan@fallingsnow.net> wrote:
> >
> >
> > Does ruby-ffi not support the :strptr type? It's in the original FFI spec.
>
> No.  The most likely reason it was not included was because (at the
> time) there was no code using it and no tests.
>
> Its not hard to add - but any code using it will be incompatible with
> jruby 1.5 and below, so people are going to have to declare the return
> type as :pointer and extract the string anyway to be backwards
> compatible.

Thanks both, though it's not already in ruby-ffi is good to know about
strptr type. I was just confused that there was nothing like that (I
mean, only a string type that normally you are not gonna use due to
memory issues, it seem to me a bit weird).

To unsubscribe from this group, send email to ruby-ffi+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.