summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 01:03:36 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 01:03:36 +0100
commitb824aed3edf4f51b6a0fb13370c3abc75bc85206 (patch)
tree8feda621a9b1738f06780ce55d3462aada961e11 /Lisp
parent61cf033c065e1de06524d29e246926985d0c06b6 (diff)
Fix SLOT-VALUE-USING-CLASS (OBJECTIVE-C-CLASS ...).
darcs-hash:37402e60f79e9837371a68a33126e3b68eb32b09
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/class-definition.lisp7
-rw-r--r--Lisp/libobjcl.lisp13
2 files changed, 7 insertions, 13 deletions
diff --git a/Lisp/class-definition.lisp b/Lisp/class-definition.lisp
index 118e76a..28e97dd 100644
--- a/Lisp/class-definition.lisp
+++ b/Lisp/class-definition.lisp
@@ -149,9 +149,10 @@
(effective-slot-definition
foreign-effective-slot-definition))
(with-slots (foreign-name foreign-type) effective-slot-definition
- (cffi:convert-from-foreign
- (%objcl-slot-value (pointer-to instance) foreign-name)
- (typespec->c-type foreign-type))))
+ ;; 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)))))
(defmethod (setf c2mop:slot-value-using-class) (value
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index da85f31..727bfc5 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -104,9 +104,10 @@
(slot-name :string)
(value :pointer)) ; void
-(defcfun ("objcl_slot_value" %objcl-slot-value) :pointer
+(defcfun ("objcl_get_slot_value" %objcl-get-slot-value) :void
(obj :pointer) ; id
- (slot-name :string))
+ (slot-name :string)
+ (value-out :pointer))
(defcfun ("objcl_class_direct_slots" %objcl-class-direct-slots) :pointer
(class :pointer) ; Class
@@ -849,14 +850,6 @@ separating parts by hyphens works nicely in all of the `:INVERT`,
;;;; (@* "Slot access")
-(defun objcl-set-slot-value (instance slot-name value)
- ;; FIXME
- (error "To be done."))
-
-(defun objcl-slot-value (instance slot-name)
- ;; FIXME
- (error "To be done."))
-
(defun objcl-slot-type (slot)
(%objcl-slot-type slot))