From: Wayne Meissner <wmeissner@gm...> - 2009-08-23 23:17:25
Over the weekend, I had another go at implementing a subset of ctypes,
directly atop jffi, instead of trying to implement the _rawffi api
Going the _rawffi route was proving to be more trouble than it was
worth, as it is fairly complex and undocumented, and its pretty much
all-or-nothing - you can't implement a subset of it and accretially
build on top of it. Developing & debugging it was not fun. Added to
that it was glacially slow - from memory, about 50 times slower than
So I started again, with the aim of a shippable subset of the API.
Shippable meaning the portions of the api that are implemented are
solid, and if someone tries to use something not implemented, you get
a python error, instead of crashing the VM.
What is implemented? Not much. Basically scalar (all integer and
float types) and string parameters, and scalar returns. Probably
useful enough to call quite a few posix and other simple apis, but not
a whole lot more. By-reference, Pointer and Structure types will
follow (as time permits), which will make it quite a bit more useful.
The code is in branches/ctypes-jffi in the jython repo, if anyone
wants to take a look at it.
From: Frank Wierzbicki <fwierzbicki@gm...> - 2009-08-25 01:07:55
On Sun, Aug 23, 2009 at 7:09 PM, Wayne Meissner<wmeissner@...> wrote:
> The code is in branches/ctypes-jffi in the jython repo, if anyone
> wants to take a look at it.
Cool! Thanks for taking another look!