[Python-Dev] flextype.c -- extended type system

Christian Tismer tismer@tismer.com
Tue, 17 Sep 2002 11:56:34 +0200


Thomas Heller wrote:
>>>My additions support a subset of C++ virtual methods.
>>>How is that esoteric?
>>
>>Why would an extension writer ever want to do this? "Normal" extension
>>types either wrap some C type, so you don't have inheritance at all,
>>or some C++ type, in which case a single type method can wrap
>>arbitrary virtual methods (since the VMT is done in C++).
> 
> 
> I'm still in favor of a 'clean' method to add additional
> C accessible structure fields to types. Currently I'm
> attaching them to the the type's dict, as I reported before.
> 
> As I understand it, Christian's first patch allows this.

Please let me know when you're actually going to use
it. I know there is a bug in the 2.3 patch. For Stackless,
I'm still hacking against 2.2.1, and the patch has been
extended in serveral ways as well: I removed the assumption
that objects generated from heap types need always to
be GC objects. This was probably decided with too much
classes in mind, but now this feature also makes sense
to simple types where you might want to avoid GC for
space or other reasons.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@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/