FFI (was: RE: [UPDATES] 30 new updates for 2.8alpha)
montgomery farrar tidwell
mtidwell at mail.com
Wed Feb 9 20:03:28 UTC 2000
Howdy,
no. i just put SqueakFFIPrims.so in the same directory as
the squeak executable and the FFI stuff worked.
\\//_
Stephan Rudlof wrote:
>
> Is it correct that I need a 'libffi' from cygnus in addition to the
> SqueakFFIPrims plugin to run this code under Linux?
>
> >From sqUnixFFI.c:
>
> * NOTES: The Unix version of the FFI support code relies on libffi
> from
> * http://sourceware.cygnus.com/libffi/
>
> Stephan
>
> Bert Freudenberg wrote:
> >
> > On Sun, 6 Feb 2000, Raab, Andreas wrote:
> >
> > > For those of you who want to play with this ...
> >
> > Works like a charm on Linux:
> >
> > "Say Hello in the console"
> > (ExternalLibraryFunction
> > name: 'puts' module: nil callType: 0
> > returnType: ExternalType long
> > argumentTypes: {ExternalType string})
> > invokeWith: 'Hello World!'
> >
> > or, the problem of getting the local hostname:
> >
> > | buf |
> > buf _ ByteArray new: 256.
> > (ExternalLibraryFunction
> > name: 'gethostname' module: nil callType: 0
> > returnType: ExternalType long
> > argumentTypes: {ExternalType char asPointerType.
> > ExternalType long})
> > invokeWith: buf with: buf size.
> > (buf copyUpTo: 0) asString
> >
> > This one seems to need a byte array - perhaps Strings may not be modified?
> >
> > > I'll put out some more information on this soon.
> >
> > Oh. I'll wait then ;-)
> >
> > -Bert-
>
> --
> Stephan Rudlof (sr at evolgo.de)
> "Genius doesn't work on an assembly line basis.
> You can't simply say, 'Today I will be brilliant.'"
> -- Kirk, "The Ultimate Computer", stardate 4731.3
--
\\//_
More information about the Squeak-dev
mailing list
|