Subject:
[ruby-ffi] Re: Defining an Extern from a Header File
From:
Wayne Meissner
Date:
3/30/11 6:06 AM
To:
ruby-ffi@googlegroups.com


try attach_variable.

e.g.
module Foo
  # std library stuff here
  # ...
  # Attach C global LEA_SERVER as ruby variable lea_server
  attach_variable :lea_server, :LEA_SERVER, :pointer
end

Then use it like so:

Foo.opsec_init_entity(env, Foo.lea_server, Foo::OPSEC_EOL);