[pypy-dev] Work plan for PyPy
Simon Burton
simon at arrowtheory.com
Thu Jun 28 04:07:15 CEST 2007
Do you think we could extend rffi to be able to
expose function calls to outside callers, so that eg.
we can make nifty cpython extension modules ?
(i think this is number 3 in my list)
Simon.
On Sat, 16 Jun 2007 13:03:16 +0200
Maciek Fijalkowski <fijal at genesilico.pl> wrote:
> Simon Burton wrote:
> > On Thu, 14 Jun 2007 18:45:54 +0200
> > Armin Rigo <arigo at tunes.org> wrote:
> >
> >
> >> Any comments or objections? Are there people that already make heavy
> >> use of rctypes, or the extension compiler?
> >>
> >
> > Indeed. Mainly rctypes.
> >
> > As well as an ever expanding use of libc,
> > we recently have interfaced to libSDL and cairo for some
> > very funky rpython graphics apps. And we use libpython
> > so that we can extract stuff from python modules.
> > Also, we do byte shuffling with rctypes: reading binary data
> > to/from buffers, etc.
> >
> > I hope we can do all this with rffi, but there are two really
> > cool things about rctypes:
> > 1) it runs on cpython (our main app takes 30minutes+ to compile)
> > 2) it has an automatic code generator (ctypes can autogenerate
> > python wrappers from C header files)
> >
> Very valid points indeed. The 1st point sounds unlikely, also because
> you might use C macros with rffi, which somehow invalidates possible
> uses on top of ctypes. What I do is I test (by compiling) several parts
> (some small code snippets involving ext functions). That make debugging
> a bit harder (reading C code), but pretty straightforward - for example
> memory management is done by hand in this part, which makes you
> responsible of tracking C structures and how long they need to live.
>
> The second point is much more likely to happen and to be better than
> ctypes code generation. (Because rffi is way more Cish than ctypes are).
>
> Also it makes stuff a bit harder when you don't submit your bindings back.
>
> If you plan to come to the post-EP pypy sprint, we can sit a bit on the
> automatic code generator for rffi.
>
> Cheers,
> fijal
>
More information about the Pypy-dev
mailing list