[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Locatives and Class slots
- To: barmar@Think.COM
- Subject: Locatives and Class slots
- From: Dennis L. Doughty <firstname.lastname@example.org>
- Date: Tue, 22 May 90 19:04 EDT
- Cc: email@example.com, commonloops.pa@Xerox.COM, slug@Warbucks.AI.SRI.COM, firstname.lastname@example.org
- In-reply-to: <19900522171316.4.BARMAR@OCCAM.THINK.COM>
- Line-fold: No
- Redistributed: commonloops.pa
Date: Tue, 22 May 90 13:13 EDT
From: barmar@Think.COM (Barry Margolin)
Date: Tue, 22 May 90 08:41 PDT
From: email@example.com (Stephen L. Nicoud)
I'm converting an application using New Flavors to use PCL on a
Symbolics 3650 (7.2). I have several cases where the code uses a flavor
instance variable as an argument to SCL:LOCF. The resulting locative is
then used with SCL:PROCESS-LOCK and SCL:PROCESS-UNLOCK.
I can't seem to get the same functionality with class slots.
Would anyone care to make suggestions about how to proceed? Is there a
way to get a locative to a PCL class slot?
Wait for Genera 8.0 before doing the conversion. Symbolics CLOS allows
LOCF to be used with slots.
With PCL you probably need to use internal functions to get at the
representation, and then use LOCF with that.
In Victoria Day PCL this used to work. I haven't tested it in any other PCL.
(defun locate-in-instance (instance slot)
(let* ((static-slots (sys:eval-in-instance instance 'static-slots))
(wrapper (sys:eval-in-instance instance 'wrapper))
(slots (elt wrapper 1))
(slot-position (position slot slots)))
(sys:locf (aref static-slots slot-position))))