[Vm-dev] Re: [Pharo-dev] Maintainer of FFI-Package

Nicolai Hess nicolaihess at web.de
Sun Sep 28 20:04:53 UTC 2014

Thank you David,
Thank you Eliot

2014-09-28 21:24 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:

> Hi Nicolai,
> On Sep 28, 2014, at 2:19 AM, Nicolai Hess <nicolaihess at web.de> wrote:
> > Who is the maintainer of the FFI-Package for
> > Squeak and/or Pharo ?
> I guess I'm the de facto maintainer because I'm the one who has changed
> things most recently, reimplementing the FFI plugin via the
> ThreadedFFIPlugin.
> > I especially interested in the FFI-Unix examples
> >  and the state on working FFI on linux for current squeak release
> > (AFAIK it does not work with "squeak all in one" 4.5)
> Can you give me a reproducible case?  I'd this with a Cog,Stack or
> Interpreter VM?  Which specific things fail and how?

latest update: #13680
Current Change Set: Unnamed1
Image format 6505 (32 bit)

Virtual Machine
Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.331]
Unix built on Aug 22 2013 10:35:37 Compiler: 4.1.2 20080704 (Red Hat
platform sources revision VM: r2776
http://www.squeakvm.org/svn/squeak/branches/Cog Plugins: r2545
CoInterpreter VMMaker.oscog-eem.331 uuid:
37d2e4b0-2f37-4e2d-8313-c63637785e59 Aug 22 2013
StackToRegisterMappingCogit VMMaker.oscog-eem.333 uuid:
84da9cb8-7f30-4cb7-b4fb-239a11f63b54 Aug 22 2013

Name: FFI-Pools-eem.3
Name: FFI-Kernel-eem.26
Name: FFI-Tests-djm.7

Run FFI-Test -> 32 run, 24 passes, 0 expected failures, 0 failures, 8
errors, 0 unexpected passes

Name: FFI-Unix-mtf.4

run X11Display class>>#coloredRectangles
-> Error: Could not coerse arguments

Load newer cogvm
Virtual Machine
Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.746]
Unix built on Jun 11 2014 14:59:18 Compiler: 4.1.2 20080704 (Red Hat
platform sources revision VM: r2987
http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2014-06-11 14:26:16
-0700 Plugins: r2954
CoInterpreter VMMaker.oscog-eem.746 uuid:
cc4961d3-e629-4e28-b308-88eab314a8c9 Jun 11 2014
StackToRegisterMappingCogit VMMaker.oscog-eem.766 uuid:
3045c341-cfbf-494c-a7b1-fb29c26a7340 Jun 11 2014

Run FFI-Test -> 32 run, 32 passes, 0 expected failures, 0 failures, 0
errors, 0 unexpected passes

The error in FFI-Unix is strange. The last package comment from
Name: FFI-Unix-mtf.4
Author: mtf
"made the XLib examples actually work (Window is an unsigned int handle,
not a struct)"

That the window is an int handle and not a struct explains why this version
replaces the parent class
of XDrawable from ExternalStructur to Object. But all calls with an
XDrawable still have this
object as parameter ( and not its instance var "xid"). I don't understand
how this ever
worked (or was there some kind of automatic argument conversion like:
transform an object with an instvar -> a int, if the function expects an
int handle?)

Sure we can replace all XDrawable arguments in X11 calls from "aXDrawable"
to "aXDrawable xid".
But I only wonder, did this ever work and if Author "mtf" did the last
change, can I contact
him or is he still maintaining the FF-Unix examples?

> > regards
> > Nicolai
> Eliot (phone)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140928/c6ac3174/attachment-0001.htm

More information about the Vm-dev mailing list