summaryrefslogtreecommitdiff
path: root/Lisp/class-definition.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-19 12:54:49 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-19 12:54:49 +0100
commit619b17ce5eb96b3cfd5f2d94174270a31e46871c (patch)
treeec5100fc26035969d1a90947b9e20fb14ff1f35d /Lisp/class-definition.lisp
parent982965f8e14194dd1660eb1faff9a3bd8be2a00b (diff)
Reimplement slot reading.
darcs-hash:bdef9c8f4c3fb2121456295da23fbe679265a15b
Diffstat (limited to 'Lisp/class-definition.lisp')
-rw-r--r--Lisp/class-definition.lisp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Lisp/class-definition.lisp b/Lisp/class-definition.lisp
index 6ecb189..e228c56 100644
--- a/Lisp/class-definition.lisp
+++ b/Lisp/class-definition.lisp
@@ -149,12 +149,14 @@
(effective-slot-definition
foreign-effective-slot-definition))
(with-slots (foreign-name foreign-type) effective-slot-definition
- ;; FIXME: Do proper value conversion here (like LOW-LEVEL-INVOKE).
- (cffi:with-foreign-object
- (return-value-cell (typespec->c-type foreign-type))
- (%objcl-get-slot-value (pointer-to instance)
- foreign-name return-value-cell)
- (mem-ref return-value-cell (typespec->c-type foreign-type)))))
+ (let ((slot-offset
+ (%objcl-get-slot-offset
+ (%objcl-get-slot (pointer-to class) foreign-name))))
+ (convert-from-foreign-value (inc-pointer (pointer-to instance)
+ slot-offset)
+ foreign-type
+ nil
+ t))))
(defmethod (setf c2mop:slot-value-using-class) (value