FFI - can I access external constants?
Jim McLoughlin
jmcloughlin.lists at gmail.com
Thu Feb 15 07:56:52 UTC 2007
I am on OSX - I used ffi calls to dlopen(), dlsym() in
module:System.framework and it worked like a charm. Many thanks.
Jim M
On 2/13/07, Andreas Raab <andreas.raab at gmx.de> wrote:
> John M McIntosh wrote:
> > Ah, of course obviously if there is some way to expose the value via a
> > library call, you could do that in FFI.
> > Like use dlsym() to get the address of the constant, then memcpy to a
> > squeak external data object....
>
> Good point! Of course, you can just use FFI to access dlopen(), dlsym()
> and friends and then construct the appropriate handle from it. It's a
> little bit awkward and I don't know if that works correctly on all
> platforms (e.g. whether the system will use the already mapped shared
> library or actually map a new one) but if you're really desperate this
> is definitely worth trying.
>
> Cheers,
> - Andreas
More information about the Squeak-dev
mailing list
|