Subject:
Re: [ruby-ffi] calling internal ruby functions
From:
Aman Gupta
Date:
4/29/11 5:17 AM
To:
"ruby-ffi@googlegroups.com" <ruby-ffi@googlegroups.com>

You can use ffi_lib(FFI::CURRENT_PROCESS).

How are you emulating the FD_* macros via FFI?

  Aman

On Friday, April 29, 2011, mixtli <ronmcclain75@gmail.com> wrote:
> I wanted to call rb_thread_select to do some async polling, so I made
> a quick wrapper.  It actually works fine, but I have to specify the
> full path to my libruby.dylib in the call to ffi_lib.   If I just put
> "libruby", it segfaults.   Is there some standard mechanism for
> forcing ffi to use the libs from the rvm environment?   This is for a
> public gem (http://github.com/mixtli/net-snmp), so I'd like it to
> automagically work in the user's environment.
>
> Also, is there a standard set of wrappers for ruby internals similar
> to the set for libc (ffi-libc)?
>
> And finally, since I'm here..  Anyone else having problems requiring
> ffi-libc on snow leopard?  A bunch of the functions don't seem to be
> defined on my system (clearenv, stdin, etc).
>
>
>