summaryrefslogtreecommitdiffstats
path: root/Include/modsupport.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-08 15:18:27 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-08 15:18:27 (GMT)
commit1c45073aba8f4097b4dc74d4fd3b2f5ed5e5ea9b (patch)
tree60b870fedf9a942d17a1eed7c852fca73176d5ae /Include/modsupport.h
parent4c398fde5c76847e12eb265716f35a57ce035822 (diff)
downloadcpython-1c45073aba8f4097b4dc74d4fd3b2f5ed5e5ea9b.zip
cpython-1c45073aba8f4097b4dc74d4fd3b2f5ed5e5ea9b.tar.gz
cpython-1c45073aba8f4097b4dc74d4fd3b2f5ed5e5ea9b.tar.bz2
Keep track of a type's subclasses (subtypes), in tp_subclasses, which
is a list of weak references to types (new-style classes). Make this accessible to Python as the function __subclasses__ which returns a list of types -- we don't want Python programmers to be able to manipulate the raw list. In order to make this possible, I also had to add weak reference support to type objects. This will eventually be used together with a trap on attribute assignment for dynamic classes for a major speed-up without losing the dynamic properties of types: when a __foo__ method is added to a class, the class and all its subclasses will get an appropriate tp_foo slot function.
Diffstat (limited to 'Include/modsupport.h')
0 files changed, 0 insertions, 0 deletions