[pypy-dev] Builtin types

Christian Tismer tismer at tismer.com
Tue Jan 28 00:21:46 CET 2003

Armin Rigo wrote:
> Hello Holger,
> On Mon, Jan 27, 2003 at 08:03:40PM +0100, Samuele Pedroni wrote:
>>>how do you intend to use any of the existing C-libraries, then?
>>>Rely on CPython to provide the binding?
>>The point was whether you want your builtin types "abstractions" to be directly
>>ctypes based.
> Yes, sorry.  I was thinking about that, i.e. how we internally represent the
> built-in types.  Being able to call external C code is another matter.
>>>I think that progressing in the ctypes direction can happen in
>>>parallel with Python-Core pythonifications.  Beeing able to make
>>>C-library calls (like File-IO) without specialized intermediate C-code
>>>does seem like an important feature.
> Yes, although I have another potential objection here.  It might not be a
> problem to have specialized intermediate C code if this code is generated,
> just like -- after all it's the goal -- most of the rest of the final C code
> of the interpreter.  Then what we need is a way to *describe* calls to a C
> function rather than a way to actually *do* the calls.  So ctypes is a good
> way to express such a description, but it is not necessary to rely on
> libffi-style machine-code hackery to actually perform the calls; all we need
> to do is statically emit the specialized C code into the produced interpreter
> and obtain something close to the original CPython source.

It seems that I could have saved my last longer post.
We agree that we need to describe primitive types.
It is much less urgent to actually implement them.

cheers - chris

More information about the Pypy-dev mailing list