ctypes news (was Re: [pypy-dev] __builtin__ module)
hpk at trillke.net
Sat Jan 25 21:35:50 CET 2003
[Thomas Heller Fri, Jan 24, 2003 at 03:41:42PM +0100]
> holger krekel <hpk at trillke.net> writes:
> > Anyway, I would try very hard to express all the builtins in python.
> > And i see Thomas Heller's ctypes approach as a way to make
> > this possible.
> So do I ;-) ;-), although I'm have no idea where to begin.
> Construct a new Python type by assembling the type structure
> completely as a ctypes type?
Hmm, that's one of my black areas in current CPython: the type
system. I admit it's a rather large one :-)
But wouldn't using a ctypes represenation of Python types only
be neccessary when interfacing with CPython C stuff?
IMV the 'chr' function could be implemented at 'interpreter level'
and have representation-optimized access methods. So if a
PyString had a ctype as its 'array' (is that possible today?)
then effectively an assembler intruction fetching one byte
and using that as a representation for a PyInt object
might do it. I am trying to use the terms from previous
discussions. But unless i coded some of that myself i am
sure that i am not completly making sense ....
> Here are some news on ctypes:
> Development has has moved to SF: http://sourceforge.net/projects/ctypes.
Thomas, can you imagine the forthcoming pypy-repository and your ctypes-repo
to merge at some point? CTypes would of course still have its own directory
and could be separately tagged etc.
Here, I am already thinking about how we can actually
manage our upcoming coding at the Sprint. I think that
having "everything neccessary" in one repo would be quite
More information about the Pypy-dev