[pypy-dev] Builtin types

Christian Tismer tismer at tismer.com
Fri Jan 24 17:25:38 CET 2003


Christian Tismer wrote:
...

A small addition:
>> I'm not really understanding what you're proposing here.
> 
> 
> I am trying to extend the new-style classes
> that includes ctypes, somehow.
> 
>> You could look at ctypes as implementing 'typed slots' with
>> C-compatible layout.
...

>> This is maybe also something that ctypes already does.
>> The B *class* above knows all about this C structure
>>
>> struct B {
>>     char x;
>>     int y;
>>     long long z;
>> };

Ok, what I was thinking of was to use ctypes
or something similar to describe structs,
and then to build all objects on top of this.
This means that details like type pointer and
reference counts go into this definiton as
well, together with their behavior, and we
are able to try different approaches as well.

Probably this idea is trivial, and you though
this way all the time.

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



More information about the Pypy-dev mailing list