[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
smob design
From: |
Dan Eble |
Subject: |
smob design |
Date: |
Tue, 7 Oct 2014 00:57:24 -0400 |
The Smob code is sending me mixed messages. On one hand, it looks like
multiple levels of derivation will not work, e.g. creating a subclass of Book,
because
Book::Book() would call smobify_self() before the subclass constructor runs
scm_gc_register_collectable_memory() would sizeof(Book) rather than
sizeof(derived class)
etc.?
On the other hand, Book uses the macro VIRTUAL_COPY_CONSTRUCTOR to define a
virtual clone() method, as if derivation were intended.
Am I confused because the code is confusing, or for no particular reason? If
the code could be cleaned up, which direction should it move in?
Thanks,
—
Dan