|
From: | Dan Muresan |
Subject: | Re: [Chicken-users] records in evicted objects |
Date: | Wed, 23 May 2007 20:44:40 +0300 |
User-agent: | Thunderbird 1.5.0.10 (X11/20070306) |
The zeroth "slot" of the record contains the symbol representing its type. When you evict the record, you also evict the symbol. The interned and uninterned symbols are not equal, hence the type-check failure when it is inspected. (equal? :pare (object-evict :pare)) => #f You could set the slot-value back to the non-evicted, interned symbol:
Well, the Chicken manual warns against setting slots in evicted objects to non-evicted data, so I'm not gonna do it.
I think the right thing to do would be to change the SRFI-9 implementation so that, for evicted objects, it skips the record type test.
Best, Dan
[Prev in Thread] | Current Thread | [Next in Thread] |