diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 07:42:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 07:42:28 -0700 |
commit | 618a854df42cb43e410ba488a6634dae16a3e36f (patch) | |
tree | 1f143263a194f7bb565dc7bf718a9388906bc63d /txr.1 | |
parent | 35e464c8cbd8a5ce386cc2d095ae916bf9d9a118 (diff) | |
download | txr-618a854df42cb43e410ba488a6634dae16a3e36f.tar.gz txr-618a854df42cb43e410ba488a6634dae16a3e36f.tar.bz2 txr-618a854df42cb43e410ba488a6634dae16a3e36f.zip |
subtypep: handle COBJ inheritance.
* lib.c (class_from_sym): New static function.
(subtypep): Remove special case handling of stream versus
stdio-stream. If the two types are not both structures, then
check whether they are both cobj classes. If so, check if they
are in an inheritance relationship via the cobj_hash.
(cobj_populate_hash): Map each symbol to a fixnum integer
which gives class handle'position in the cobj_class table.
(cobj_class_exists): Style: compare to nil instead of 0.
(obj_init): Do not call cobj_populate_hash here, it is far too
early: only a couple of COBJ types exist at this point.
Moreover, hash_init has not been called so hash_cls and
hash_iter_cls still have null symbols.
(init): Call obj_populate_hash here, as the last step.
* tests/012/type.tl: New file.
Diffstat (limited to 'txr.1')
0 files changed, 0 insertions, 0 deletions