summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/lisp-value-wrapping.lisp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp
index cfe1603..8eda55c 100644
--- a/Lisp/lisp-value-wrapping.lisp
+++ b/Lisp/lisp-value-wrapping.lisp
@@ -39,6 +39,20 @@
(:metaclass ns::+ns-object))
+(defun intern-lisp-value (value)
+ ;; We need this function in order to preserve object identity on the
+ ;; Objective-C side. As we want [(intern-lisp-value 10) self] to
+ ;; return the FIXNUM 10, that is, a Lisp value rather than an
+ ;; Objective-C instance, we cannot guarantee that
+ ;;
+ ;; (let ((x (intern-lisp-value y)))
+ ;; (objc-eql x (invoke x 'self)))
+ ;;
+ ;; will evaluate to true unless we generally intern Lisp value
+ ;; wrappers.
+ (error "FIXME"))
+
+
(defun make-lisp-value (value)
;; FIXME: The following won't work. Make MAKE-INSTANCE more useful...
;(make-instance 'ns::mlk-lisp-value :value value)